Get songs endpoint #162

Merged
kdeng00 merged 27 commits from get_songs into v0.2 2025-07-25 18:20:28 -04:00
2 changed files with 2 additions and 1 deletions
Showing only changes of commit 402d65efe9 - Show all commits
+1
View File
@@ -996,6 +996,7 @@ pub mod endpoint {
match params.id { match params.id {
Some(id) => match super::song_db::get_song(&pool, &id).await { Some(id) => match super::song_db::get_song(&pool, &id).await {
Ok(song) => { Ok(song) => {
response.message = String::from(super::super::response::SUCCESSFUL);
response.data.push(song); response.data.push(song);
(axum::http::StatusCode::OK, axum::Json(response)) (axum::http::StatusCode::OK, axum::Json(response))
} }
+1 -1
View File
@@ -235,7 +235,7 @@ mod tests {
pub async fn migrations(pool: &sqlx::PgPool) { pub async fn migrations(pool: &sqlx::PgPool) {
// Run migrations using the sqlx::migrate! macro // Run migrations using the sqlx::migrate! macro
// Assumes your migrations are in a ./migrations folder relative to Cargo.toml // Assumes your test migrations are in a ./test_migrations folder relative to Cargo.toml
sqlx::migrate!("./test_migrations") sqlx::migrate!("./test_migrations")
.run(pool) .run(pool)
.await .await