feat(presentation): GET /users/me, GET /users/{username}/thoughts, GET /tags/{name}

This commit is contained in:
2026-05-14 11:20:48 +02:00
parent e408a53136
commit 6082766935
3 changed files with 55 additions and 2 deletions

View File

@@ -13,3 +13,8 @@ pub async fn patch_profile(State(s): State<AppState>, AuthUser(uid): AuthUser, J
let user = s.users.find_by_id(&uid).await?.ok_or(domain::errors::DomainError::NotFound)?;
Ok(Json(to_user_response(&user)))
}
pub async fn get_me(State(s): State<AppState>, AuthUser(uid): AuthUser) -> Result<Json<UserResponse>, ApiError> {
let user = s.users.find_by_id(&uid).await?.ok_or(domain::errors::DomainError::NotFound)?;
Ok(Json(to_user_response(&user)))
}