chore: prototyping on user route

This commit is contained in:
Paul Makles
2022-01-31 16:59:21 +00:00
parent 0fdb749199
commit c39a9917df
2 changed files with 5 additions and 4 deletions

View File

@@ -1,8 +1,9 @@
use revolt_quark::Result;
use revolt_quark::models::User;
use rocket::serde::json::Value;
use rocket::serde::json::{Json, Value};
#[get("/@me")]
pub async fn req(/*user: UserRef*/) -> Result<Value> {
todo!()
pub async fn req(user: User) -> Result<Json<User>> {
Ok(Json(user))
}

View File

@@ -3,6 +3,6 @@ use revolt_quark::{Error, Result};
use rocket::serde::json::Value;
#[get("/<target>")]
pub async fn req(/*user: UserRef, target: Ref*/ target: String) -> Result<Value> {
pub async fn req(user: User, target: User, target: String) -> Result<Value> {
todo!()
}