From 4d76217afb09b6b4d74f423c28f6e26029b28a0c Mon Sep 17 00:00:00 2001 From: Jani Pulkkinen Date: Fri, 30 May 2025 09:54:57 +0300 Subject: [PATCH] putsausta --- src/loota.rs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/loota.rs b/src/loota.rs index a9aceb1..67a95a7 100644 --- a/src/loota.rs +++ b/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() - .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") - } + _ => HttpResponse::NotFound() + .content_type(APPLICATION_JSON) + .await + .unwrap(), } }