diff options
author | Adam T. Carpenter <atc@53hor.net> | 2020-11-11 20:07:12 -0500 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2020-11-11 20:07:12 -0500 |
commit | 7381a7033231e6454a37fd64b1f3de4e8d59355f (patch) | |
tree | 7ae54976c2d036e0fe7cb199a7f6facdd09bbb6d /dichroism/src/handlers.rs | |
parent | c5280144de096c274f185fade287ccd63b954ceb (diff) | |
download | theglassyladies-7381a7033231e6454a37fd64b1f3de4e8d59355f.tar.xz theglassyladies-7381a7033231e6454a37fd64b1f3de4e8d59355f.zip |
Kind of flailing with the UI; lots of API bugfixes though.
Diffstat (limited to 'dichroism/src/handlers.rs')
-rw-r--r-- | dichroism/src/handlers.rs | 6 |
1 files changed, 1 insertions, 5 deletions
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 |