Can get current user identity
This commit is contained in:
10
src/server/api/mod.rs
Normal file
10
src/server/api/mod.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
use crate::extractors::client_auth::APIClientAuth;
|
||||
use crate::server::HttpResult;
|
||||
use actix_web::HttpResponse;
|
||||
|
||||
pub mod account;
|
||||
|
||||
/// API Home route
|
||||
pub async fn api_home(auth: APIClientAuth) -> HttpResult {
|
||||
Ok(HttpResponse::Ok().body(format!("Welcome user {}!", auth.user.user_id.0)))
|
||||
}
|
||||
Reference in New Issue
Block a user