putsausta
This commit is contained in:
15
src/loota.rs
15
src/loota.rs
@@ -219,19 +219,10 @@ async fn get_admin_orders() -> impl Responder {
|
||||
.content_type(APPLICATION_JSON)
|
||||
.json(response),
|
||||
|
||||
Ok(Err(diesel_error)) => {
|
||||
println!("Diesel error: {:?}", diesel_error);
|
||||
HttpResponse::InternalServerError()
|
||||
_ => HttpResponse::NotFound()
|
||||
.content_type(APPLICATION_JSON)
|
||||
.body("Database query failed")
|
||||
}
|
||||
|
||||
Err(blocking_error) => {
|
||||
println!("Blocking error: {:?}", blocking_error);
|
||||
HttpResponse::InternalServerError()
|
||||
.content_type(APPLICATION_JSON)
|
||||
.body("Server thread blocking error")
|
||||
}
|
||||
.await
|
||||
.unwrap(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user