Get User profile endpoint (#18)
Rust Build / Rustfmt (push) Successful in 38s
Rust Build / Test Suite (push) Failing after 1m43s
Rust Build / Check (push) Successful in 1m52s
Rust Build / Clippy (push) Successful in 1m10s
Rust Build / build (push) Successful in 2m4s
Rust Build / Rustfmt (pull_request) Successful in 1m9s
Rust Build / Clippy (pull_request) Successful in 1m17s
Rust Build / Check (pull_request) Successful in 1m36s

Reviewed-on: phoenix/textsender_auth#18
This commit was merged in pull request #18.
This commit is contained in:
2026-07-01 22:37:25 -04:00
parent 438b19e170
commit 9dba08f179
6 changed files with 183 additions and 248 deletions
+15 -1
View File
@@ -24,9 +24,12 @@ pub mod init {
paths(
common_callers::endpoint::db_ping, common_callers::endpoint::root,
register_caller::register_user, login_caller::user_login,
login_caller::get_user_profile,
),
components(schemas(common_callers::response::TestResult,
register_responses::Response, login_responses::LoginResponse)),
register_responses::Response, login_responses::LoginResponse,
login_responses::GetUserProfileResponse,
)),
tags(
(name = "TextSender Auth API", description = "Auth API for TextSender API")
)
@@ -39,6 +42,7 @@ pub mod init {
let cors = tower_http::cors::CorsLayer::new()
.allow_methods([
axum::http::Method::GET,
axum::http::Method::PATCH,
axum::http::Method::POST,
axum::http::Method::PUT,
axum::http::Method::DELETE,
@@ -76,6 +80,12 @@ pub mod init {
cors.allow_origin(vec![
"http://localhost:4200".parse().unwrap(),
"http://127.0.0.1:4200".parse().unwrap(),
"http://localhost:5173".parse().unwrap(),
"http://127.0.0.1:5173".parse().unwrap(),
"http://localhost:9080".parse().unwrap(),
"http://127.0.0.1:9080".parse().unwrap(),
"http://localhost:9081".parse().unwrap(),
"http://127.0.0.1:9081".parse().unwrap(),
])
}
}
@@ -118,6 +128,10 @@ pub mod init {
callers::endpoints::UPDATE_USER_NAME,
patch(callers::login::update_name_of_user),
)
.route(
callers::endpoints::GET_USER_PROFILE,
get(callers::login::get_user_profile),
)
.layer(cors::configure_cors().await)
}