Tweaks for the desktop client
This commit is contained in:
@ -8,11 +8,11 @@ pub struct Params {
|
||||
type Response = GeneralResult<Json<db::users::UserInfo>>;
|
||||
|
||||
pub async fn get(State(pool): State<Pool>, Query(params): Query<Params>) -> Response {
|
||||
let info = db::users::get(params.user_id, &pool)
|
||||
db::users::get(params.user_id, &pool)
|
||||
.await
|
||||
.handle_internal("Error getting the user")?
|
||||
.handle(StatusCode::NOT_FOUND, "User not found")?;
|
||||
Ok(Json(info))
|
||||
.handle(StatusCode::NOT_FOUND, "User not found")
|
||||
.map(Json)
|
||||
}
|
||||
|
||||
pub async fn current(state: State<Pool>, claims: Claims) -> Response {
|
||||
|
Reference in New Issue
Block a user