+ Fixed issue with /channels/delete return 200 on db-lib failure
This commit is contained in:
parent
5d8ecdfdb7
commit
8b7684c0a7
@ -78,8 +78,14 @@ pub async fn delete_channel(pool: &Pool, response: &mut Response<Body>, params:
|
||||
// TODO: something more intelligent with the logging im ngl
|
||||
match Channel::delete(pool, id).await {
|
||||
db::Response::Success => {},
|
||||
db::Response::Other(data) => println!("\t{}", data),
|
||||
_ => {}
|
||||
db::Response::Other(data) => {
|
||||
eprintln!("\t{}", data);
|
||||
*response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR;
|
||||
}
|
||||
_ => {
|
||||
eprintln!("\tBro like restart the server");
|
||||
*response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user