Now checking that user_id from claims exists
This commit is contained in:
@ -10,7 +10,8 @@ type Response = Result<Json<db::users::UserInfo>, StatusCode>;
|
||||
pub async fn get(State(pool): State<Pool>, Query(params): Query<Params>) -> Response {
|
||||
let info = db::users::get(params.user_id, &pool)
|
||||
.await
|
||||
.handle_internal()?;
|
||||
.handle_internal()?
|
||||
.ok_or(StatusCode::NOT_FOUND)?;
|
||||
Ok(Json(info))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user