Skip to content

Commit 6122274

Browse files
committed
style: fix cargo fmt formatting issues
1 parent 3bab215 commit 6122274

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

backend/src/presentation/handlers.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ use axum::{
88
use crate::{
99
application::{
1010
commands::{create_profile::create_profile, login::login, update_profile::update_profile},
11-
dtos::{AuthTokenResponse, CreateProfileRequest, NonceResponse, ProfileResponse, UpdateProfileRequest},
11+
dtos::{
12+
AuthTokenResponse, CreateProfileRequest, NonceResponse, ProfileResponse,
13+
UpdateProfileRequest,
14+
},
1215
queries::{
1316
get_all_profiles::get_all_profiles, get_login_nonce::get_login_nonce,
1417
get_profile::get_profile,
@@ -92,11 +95,7 @@ pub async fn login_handler(
9295
Extension(VerifiedWallet(address)): Extension<VerifiedWallet>,
9396
) -> impl IntoResponse {
9497
match login(address.clone()).await {
95-
Ok(token) => (
96-
StatusCode::OK,
97-
Json(AuthTokenResponse { token, address }),
98-
)
99-
.into_response(),
98+
Ok(token) => (StatusCode::OK, Json(AuthTokenResponse { token, address })).into_response(),
10099
Err(e) => (
101100
StatusCode::INTERNAL_SERVER_ERROR,
102101
Json(serde_json::json!({"error": e})),

backend/src/presentation/middlewares.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ pub async fn eth_auth_layer(
3838
if let Some(token) = auth_str.strip_prefix("Bearer ") {
3939
let jwt_manager = JwtManager::new();
4040
if let Ok(claims) = jwt_manager.validate_token(token) {
41-
req.extensions_mut()
42-
.insert(VerifiedWallet(claims.address));
41+
req.extensions_mut().insert(VerifiedWallet(claims.address));
4342
return Ok(next.run(req).await);
4443
}
4544
}

0 commit comments

Comments
 (0)