putsausta

This commit is contained in:
Jani Pulkkinen
2025-05-30 09:54:57 +03:00
parent 0756da8b7b
commit 4d76217afb

View File

@@ -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(),
}
}