From 60a114af960ef8c9926efd15a905fd0abe9b842b Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Fri, 25 Jul 2025 16:25:23 -0400 Subject: [PATCH] Added skeleton endpoint to get songs --- src/callers/song.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/callers/song.rs b/src/callers/song.rs index 7d23857..61c9ab7 100644 --- a/src/callers/song.rs +++ b/src/callers/song.rs @@ -92,6 +92,13 @@ pub mod request { pub user_id: uuid::Uuid, } } + + pub mod get_songs { + #[derive(Debug, Default, serde::Deserialize, serde::Serialize)] + pub struct Params { + pub id: Option + } + } } pub mod response { @@ -158,6 +165,14 @@ pub mod response { pub data: Vec, } } + + pub mod get_songs { + #[derive(Debug, Default, serde::Deserialize, serde::Serialize)] + pub struct Response { + pub message: String, + pub data: Vec + } + } } // TODO: Might make a distinction between year and date in a song's tag at some point @@ -968,4 +983,12 @@ pub mod endpoint { } } } + + pub async fn get_songs(axum::Extension(pool): axum::Extension, + axum::extract::Query(params): axum::extract::Query) + -> (axum::http::StatusCode, Json) { + let mut response = super::response::get_songs::Response::default(); + + (axum::http::StatusCode::OK, axum::Json(response)) + } }