forked from jmug/stoatchat
chore: prototyping on user route
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
use revolt_quark::Result;
|
use revolt_quark::Result;
|
||||||
|
use revolt_quark::models::User;
|
||||||
|
|
||||||
use rocket::serde::json::Value;
|
use rocket::serde::json::{Json, Value};
|
||||||
|
|
||||||
#[get("/@me")]
|
#[get("/@me")]
|
||||||
pub async fn req(/*user: UserRef*/) -> Result<Value> {
|
pub async fn req(user: User) -> Result<Json<User>> {
|
||||||
todo!()
|
Ok(Json(user))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ use revolt_quark::{Error, Result};
|
|||||||
use rocket::serde::json::Value;
|
use rocket::serde::json::Value;
|
||||||
|
|
||||||
#[get("/<target>")]
|
#[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!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user