bda1ef251a
calling this v0.4.0
14 lines
275 B
Rust
14 lines
275 B
Rust
use rocket::State;
|
|
use crate::api::auth::Session;
|
|
use crate::error::ApiResult;
|
|
use crate::svc::user_svc::UserService;
|
|
|
|
#[get("/users/<id>")]
|
|
pub async fn display_name(
|
|
id: i64,
|
|
_ag: Session,
|
|
svc: &State<UserService>,
|
|
) -> ApiResult<String> {
|
|
svc.get_username(id).await
|
|
}
|