Skip to content

Commit

Permalink
chore: change admin table api return json format (#2683)
Browse files Browse the repository at this point in the history
  • Loading branch information
paomian authored Nov 2, 2023
1 parent 479ffe5 commit 04a8fc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/meta-srv/src/service/admin/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ impl HttpHandler for TableHandler {
.await
.context(TableMetadataManagerSnafu)?
.into_iter()
.map(|(k, v)| (format!("{k}"), format!("{v:?}")))
.collect::<HashMap<_, _>>();

http::Response::builder()
.header("Content-Type", "application/json")
.status(http::StatusCode::OK)
// Safety: HashMap<String, String> is definitely "serde-json"-able.
.body(serde_json::to_string(&table_info_values).unwrap())
Expand Down

0 comments on commit 04a8fc5

Please sign in to comment.