summaryrefslogtreecommitdiff
path: root/dichroism/src/handlers.rs
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-10-08 21:56:57 -0400
committerAdam T. Carpenter <atc@53hor.net>2020-10-08 21:56:57 -0400
commitd3a28fde46bb06f084c74904fa8849b40e5f8c87 (patch)
treee2d52a37524f1e792d6acc6e871f7711ca64001a /dichroism/src/handlers.rs
parent89722ebd6dcdc7067277050a431fbb7b9ea1dcf5 (diff)
downloadtheglassyladies-d3a28fde46bb06f084c74904fa8849b40e5f8c87.tar.xz
theglassyladies-d3a28fde46bb06f084c74904fa8849b40e5f8c87.zip
refactored image_api into NewProductImageData and NewProductImages,
ready for repo
Diffstat (limited to 'dichroism/src/handlers.rs')
-rw-r--r--dichroism/src/handlers.rs20
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.")
}