Formatting
This commit is contained in:
+4
-10
@@ -129,8 +129,7 @@ pub mod metadata_queue {
|
|||||||
});
|
});
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
Ok(row) => {
|
Ok(row) => Ok(MetadataQueue {
|
||||||
Ok(MetadataQueue{
|
|
||||||
id: row
|
id: row
|
||||||
.try_get("id")
|
.try_get("id")
|
||||||
.map_err(|_e| sqlx::Error::RowNotFound)
|
.map_err(|_e| sqlx::Error::RowNotFound)
|
||||||
@@ -147,8 +146,7 @@ pub mod metadata_queue {
|
|||||||
.try_get("song_queue_id")
|
.try_get("song_queue_id")
|
||||||
.map_err(|_e| sqlx::Error::RowNotFound)
|
.map_err(|_e| sqlx::Error::RowNotFound)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
})
|
}),
|
||||||
}
|
|
||||||
Err(_err) => Err(sqlx::Error::RowNotFound),
|
Err(_err) => Err(sqlx::Error::RowNotFound),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -183,14 +181,10 @@ pub mod endpoint {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub async fn fetch_metadata(
|
pub async fn fetch_metadata(
|
||||||
axum::Extension(pool): axum::Extension<sqlx::PgPool>,
|
axum::Extension(pool): axum::Extension<sqlx::PgPool>,
|
||||||
axum::extract::Query(params): axum::extract::Query<super::request::fetch_metadata::Params>
|
axum::extract::Query(params): axum::extract::Query<super::request::fetch_metadata::Params>,
|
||||||
) -> (
|
) -> (StatusCode, Json<super::response::fetch_metadata::Response>) {
|
||||||
StatusCode,
|
|
||||||
Json<super::response::fetch_metadata::Response>,
|
|
||||||
) {
|
|
||||||
let mut response = super::response::fetch_metadata::Response::default();
|
let mut response = super::response::fetch_metadata::Response::default();
|
||||||
let song_queue_id: uuid::Uuid = match params.song_queue_id {
|
let song_queue_id: uuid::Uuid = match params.song_queue_id {
|
||||||
Some(id) => id,
|
Some(id) => id,
|
||||||
|
|||||||
Reference in New Issue
Block a user