chore: use pretty

This commit is contained in:
2020-11-07 23:18:49 +08:00
parent 6f7b3ecce8
commit 939861e987

View File

@@ -70,7 +70,7 @@ async fn main() {
result.insert("status", "400".to_owned());
result.insert("message", "Script verify failed!".to_owned());
result.insert("js_hash", format!("{}", js_hex));
return serde_json::to_string(&result).unwrap()
return serde_json::to_string_pretty(&result).unwrap()
}
let context = QuickJSContext::new().unwrap();
@@ -92,7 +92,7 @@ async fn main() {
result.insert("result", r.into_string().unwrap_or_else(|| "null".to_owned()));
},
}
return serde_json::to_string(&result).unwrap()
return serde_json::to_string_pretty(&result).unwrap()
});
println!("Listen at 127.0.0.1:8888 ...");