This commit is contained in:
2023-08-14 00:00:11 +08:00
parent eff78bcf21
commit 9afca20456

View File

@@ -51,8 +51,8 @@ async fn inner_read(req: Request<Body>) -> XResult<(StatusCode, Value)> {
drop(key);
let mut map = byte_to_multi_view_map(&data.0);
map.insert("name".to_string(), Value::String(name.to_string()));
map.insert("comment".to_string(), db_key_value.comment.map(|c| Value::String(c)).unwrap_or(Value::Null));
map.insert("name".to_string(), name.as_str().into());
map.insert("comment".to_string(), db_key_value.comment.into());
serve_common::ok(Value::Object(map))
}