From 83657ff4c7758f9e8677d3f3aadbb7e416ff105c Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Thu, 28 Mar 2024 18:26:43 +0900 Subject: [PATCH] style: cargo fmt --- server/src/main.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/src/main.rs b/server/src/main.rs index 6eff58a..2584a13 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -126,17 +126,17 @@ mod infra_repository_impls { } mod presentation { + use crate::config::CONFIG; use crate::domain::{BuildHandler, BuildRepository}; use axum::extract::State; use axum::http::StatusCode; use axum::response::{ErrorResponse, IntoResponse, Response, Result}; use axum::Json; - use axum_extra::headers::Authorization; use axum_extra::headers::authorization::Bearer; + use axum_extra::headers::Authorization; use axum_extra::TypedHeader; use serde_json::json; use tokio_util::io::ReaderStream; - use crate::config::CONFIG; #[tracing::instrument] pub async fn get_stable_build_handler( @@ -193,10 +193,10 @@ mod presentation { #[tracing::instrument] pub async fn publish_stable_build_handler( State(repository): State, - TypedHeader(auth): TypedHeader> + TypedHeader(auth): TypedHeader>, ) -> Result { if auth.token().to_string() != CONFIG.token { - return Err(ErrorResponse::from(StatusCode::FORBIDDEN.into_response())) + return Err(ErrorResponse::from(StatusCode::FORBIDDEN.into_response())); } match repository.run_stable_build().await { @@ -213,14 +213,14 @@ mod presentation { #[tracing::instrument] pub async fn publish_develop_build_handler( State(repository): State, - TypedHeader(auth): TypedHeader> + TypedHeader(auth): TypedHeader>, ) -> Result { if auth.token().to_string() != CONFIG.token { - return Err(ErrorResponse::from(StatusCode::FORBIDDEN.into_response())) + return Err(ErrorResponse::from(StatusCode::FORBIDDEN.into_response())); } match repository.run_develop_build().await { - Ok(_) => Ok(StatusCode::OK.into_response()), + Ok(_) => Ok(StatusCode::OK.into_response()), Err(err) => { tracing::error!("{:}", err); Err(ErrorResponse::from(