From 7381a7033231e6454a37fd64b1f3de4e8d59355f Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Wed, 11 Nov 2020 20:07:12 -0500 Subject: Kind of flailing with the UI; lots of API bugfixes though. --- dichroism/src/handlers.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'dichroism/src/handlers.rs') diff --git a/dichroism/src/handlers.rs b/dichroism/src/handlers.rs index ccaf347..8dd0f3b 100644 --- a/dichroism/src/handlers.rs +++ b/dichroism/src/handlers.rs @@ -8,7 +8,6 @@ use actix_web::{get, patch, post, web, Error, HttpResponse, Responder}; use futures::{StreamExt, TryStreamExt}; fn to_internal_error(e: impl std::error::Error) -> HttpResponse { - eprintln!("{}", e); HttpResponse::InternalServerError().body(e.to_string()) } @@ -120,10 +119,7 @@ async fn post_photo( // create new photo_set let photo_set = web::block(move || image_service::generate_photo_set(&data)) .await - .map_err(|e| { - eprintln!("{}", e.to_string()); - HttpResponse::InternalServerError().body(e.to_string()) - })?; + .map_err(to_internal_error)?; let conn = pool.get().map_err(to_internal_error)?; let photo_set = web::block(move || photo_set_repo::store(&conn, photo_set)) .await -- cgit v1.2.3