Code formatting

This commit is contained in:
kdeng00
2025-07-25 16:25:37 -04:00
parent 60a114af96
commit de3b96f0e0
+9 -5
View File
@@ -96,7 +96,7 @@ pub mod request {
pub mod get_songs { pub mod get_songs {
#[derive(Debug, Default, serde::Deserialize, serde::Serialize)] #[derive(Debug, Default, serde::Deserialize, serde::Serialize)]
pub struct Params { pub struct Params {
pub id: Option<uuid::Uuid> pub id: Option<uuid::Uuid>,
} }
} }
} }
@@ -170,7 +170,7 @@ pub mod response {
#[derive(Debug, Default, serde::Deserialize, serde::Serialize)] #[derive(Debug, Default, serde::Deserialize, serde::Serialize)]
pub struct Response { pub struct Response {
pub message: String, pub message: String,
pub data: Vec<i32> pub data: Vec<i32>,
} }
} }
} }
@@ -984,9 +984,13 @@ pub mod endpoint {
} }
} }
pub async fn get_songs(axum::Extension(pool): axum::Extension<sqlx::PgPool>, pub async fn get_songs(
axum::extract::Query(params): axum::extract::Query<super::request::get_songs::Params>) axum::Extension(pool): axum::Extension<sqlx::PgPool>,
-> (axum::http::StatusCode, Json<super::response::get_songs::Response>) { axum::extract::Query(params): axum::extract::Query<super::request::get_songs::Params>,
) -> (
axum::http::StatusCode,
Json<super::response::get_songs::Response>,
) {
let mut response = super::response::get_songs::Response::default(); let mut response = super::response::get_songs::Response::default();
(axum::http::StatusCode::OK, axum::Json(response)) (axum::http::StatusCode::OK, axum::Json(response))