From bf7e5d925e17b8f91999c2fb19e01c692f2973cd Mon Sep 17 00:00:00 2001 From: rascul Date: Wed, 22 Jun 2022 20:02:39 -0500 Subject: [PATCH] print the json for the response body for now --- src/routes/submit/submit_post.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/submit/submit_post.rs b/src/routes/submit/submit_post.rs index c3f4cd3..0a574ac 100644 --- a/src/routes/submit/submit_post.rs +++ b/src/routes/submit/submit_post.rs @@ -2,6 +2,7 @@ use actix_multipart::Multipart; use actix_web::{post, web, Error, HttpResponse}; use handlebars::Handlebars; +use serde_json::to_string_pretty; use crate::WotLog; @@ -14,7 +15,7 @@ pub async fn post( wotlog.parse_log()?; //let body = hb.render("submit", &json!({})).unwrap(); - let body = format!("{:#?}", wotlog); + let body = format!("{}", to_string_pretty(&wotlog.json)?); Ok(HttpResponse::Ok().body(body)) }