tsk-213: Minor status code changes

This commit is contained in:
kdeng00
2025-10-29 14:53:59 -04:00
parent 186956fc46
commit d718e0017c
+6 -9
View File
@@ -166,10 +166,7 @@ pub mod endpoint {
results.push(queue_repo); results.push(queue_repo);
} else { } else {
response.message = String::from("Invalid song type"); response.message = String::from("Invalid song type");
return ( return (axum::http::StatusCode::BAD_REQUEST, axum::Json(response));
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
axum::Json(response),
);
} }
} }
Err(err) => { Err(err) => {
@@ -426,15 +423,15 @@ pub mod endpoint {
} }
Err(err) => { Err(err) => {
response.message = err.to_string(); response.message = err.to_string();
(axum::http::StatusCode::BAD_REQUEST, axum::Json(response)) (
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
axum::Json(response),
)
} }
} }
} else { } else {
response.message = String::from("Invalid song type"); response.message = String::from("Invalid song type");
( (axum::http::StatusCode::BAD_REQUEST, axum::Json(response))
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
axum::Json(response),
)
} }
} }
Err(err) => { Err(err) => {