More cleanup
This commit is contained in:
@@ -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
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user