tsk-194: Code formatting
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
pub mod request {
|
pub mod request {
|
||||||
pub mod queue_metadata {
|
pub mod queue_metadata {
|
||||||
#[derive(Debug, Default, serde::Deserialize, serde::Serialize, sqlx::FromRow, utoipa::ToSchema)]
|
#[derive(
|
||||||
|
Debug, Default, serde::Deserialize, serde::Serialize, sqlx::FromRow, utoipa::ToSchema,
|
||||||
|
)]
|
||||||
pub struct Request {
|
pub struct Request {
|
||||||
pub song_queue_id: uuid::Uuid,
|
pub song_queue_id: uuid::Uuid,
|
||||||
pub album: String,
|
pub album: String,
|
||||||
@@ -93,7 +95,10 @@ pub mod endpoint {
|
|||||||
pub async fn queue_metadata(
|
pub async fn queue_metadata(
|
||||||
axum::Extension(pool): axum::Extension<sqlx::PgPool>,
|
axum::Extension(pool): axum::Extension<sqlx::PgPool>,
|
||||||
axum::Json(payload): axum::Json<super::request::queue_metadata::Request>,
|
axum::Json(payload): axum::Json<super::request::queue_metadata::Request>,
|
||||||
) -> (axum::http::StatusCode, axum::Json<super::response::queue_metadata::Response>) {
|
) -> (
|
||||||
|
axum::http::StatusCode,
|
||||||
|
axum::Json<super::response::queue_metadata::Response>,
|
||||||
|
) {
|
||||||
let mut results: Vec<uuid::Uuid> = Vec::new();
|
let mut results: Vec<uuid::Uuid> = Vec::new();
|
||||||
let mut response = super::response::queue_metadata::Response::default();
|
let mut response = super::response::queue_metadata::Response::default();
|
||||||
let meta = payload.to_json_value().await;
|
let meta = payload.to_json_value().await;
|
||||||
@@ -132,7 +137,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>,
|
||||||
) -> (axum::http::StatusCode, axum::Json<super::response::fetch_metadata::Response>) {
|
) -> (
|
||||||
|
axum::http::StatusCode,
|
||||||
|
axum::Json<super::response::fetch_metadata::Response>,
|
||||||
|
) {
|
||||||
let mut response = super::response::fetch_metadata::Response::default();
|
let mut response = super::response::fetch_metadata::Response::default();
|
||||||
|
|
||||||
match params.id {
|
match params.id {
|
||||||
|
|||||||
+1
-1
@@ -53,8 +53,8 @@ pub mod init {
|
|||||||
use utoipa::OpenApi;
|
use utoipa::OpenApi;
|
||||||
|
|
||||||
use crate::callers::coverart as coverart_caller;
|
use crate::callers::coverart as coverart_caller;
|
||||||
use crate::callers::queue::metadata as metadata_queue_caller;
|
|
||||||
use crate::callers::queue::coverart as coverart_queue_callers;
|
use crate::callers::queue::coverart as coverart_queue_callers;
|
||||||
|
use crate::callers::queue::metadata as metadata_queue_caller;
|
||||||
use crate::callers::queue::song as song_queue_callers;
|
use crate::callers::queue::song as song_queue_callers;
|
||||||
use crate::callers::song as song_caller;
|
use crate::callers::song as song_caller;
|
||||||
use coverart_caller::endpoint as coverart_endpoints;
|
use coverart_caller::endpoint as coverart_endpoints;
|
||||||
|
|||||||
Reference in New Issue
Block a user