tsk-213: Minor status code changes
This commit is contained in:
@@ -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,17 +423,17 @@ 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))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
response.message = String::from("Invalid song type");
|
|
||||||
(
|
(
|
||||||
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
|
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
|
||||||
axum::Json(response),
|
axum::Json(response),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
response.message = String::from("Invalid song type");
|
||||||
|
(axum::http::StatusCode::BAD_REQUEST, axum::Json(response))
|
||||||
|
}
|
||||||
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
response.message = err.to_string();
|
response.message = err.to_string();
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user