Function get_user

Source
pub async fn get_user(
    __arg0: State<AppState>,
    __arg1: Path<i64>,
) -> impl IntoResponse
Expand description

GET /api/users/{user_id}

Fetch a single user by ID. Requires admin privileges.

§Path Parameters

  • id: The user ID (integer)

§Responses

  • 200 OK: User found
  • 400 Bad Request: Invalid ID format
  • 404 Not Found: User does not exist
  • 500 Internal Server Error: DB error