Finished adding code #156

Need to make the endpoint available and then write a test. Might have to modify existing tests
This commit is contained in:
kdeng00
2025-07-18 19:14:22 -04:00
parent 8de2773a7a
commit 4af06e7fac
+11 -1
View File
@@ -664,7 +664,17 @@ pub mod endpoint {
match super::song_queue::get_song_queue(&pool, &payload.song_queue_id).await {
Ok(song_queue) => {
(axum::http::StatusCode::OK, axum::Json(response))
match super::song_queue::link_user_id(&pool, &song_queue.id, &payload.user_id).await {
Ok(user_id) => {
response.message = String::from(crate::callers::response::SUCCESSFUL);
response.data.push(user_id);
(axum::http::StatusCode::OK, axum::Json(response))
}
Err(err) => {
response.message = err.to_string();
(axum::http::StatusCode::BAD_REQUEST, axum::Json(response))
}
}
}
Err(err) => {
response.message = err.to_string();