diff options
Diffstat (limited to 'dichroism/src/handlers.rs')
-rw-r--r-- | dichroism/src/handlers.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/dichroism/src/handlers.rs b/dichroism/src/handlers.rs index 0e2b2c3..f8f10d3 100644 --- a/dichroism/src/handlers.rs +++ b/dichroism/src/handlers.rs @@ -25,17 +25,17 @@ async fn get_images(pool: web::Data<DbPool>) -> Result<HttpResponse, Error> { #[post("/images")] async fn create_image(_config: web::Data<Config>, req_body: String) -> impl Responder { - let data = match image_api::extract_data(&req_body) { - Err(e) => return HttpResponse::BadRequest().body(format!("fail: {}", e.to_string())), - Ok(d) => d, - }; + // let data = match image_api::extract_data(&req_body) { + // Err(e) => return HttpResponse::BadRequest().body(format!("fail: {}", e.to_string())), + // Ok(d) => d, + // }; - if let Err(e) = image_api::generate_images(data) { - return HttpResponse::BadRequest().body(format!( - "Unable to extract image from data URI: {}", - e.to_string() - )); - } + // if let Err(e) = image_api::generate_images(data) { + // return HttpResponse::BadRequest().body(format!( + // "Unable to extract image from data URI: {}", + // e.to_string() + // )); + // } HttpResponse::Ok().body("Image created.") } |