-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #336 from GiganticMinecraft/feat/myUserInfo
自身のユーザー情報を取得するエンドポイントの実装
Showing
3 changed files
with
10 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub mod auth; | ||
pub mod form_handler; | ||
pub mod health_check_handler; | ||
pub mod user_handler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use axum::{http::StatusCode, response::IntoResponse, Extension, Json}; | ||
use domain::user::models::User; | ||
use serde_json::json; | ||
|
||
pub async fn get_my_user_info(Extension(user): Extension<User>) -> impl IntoResponse { | ||
(StatusCode::OK, Json(json!(user))).into_response() | ||
} |