mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-08 22:32:55 +00:00
chore: change admin table api return json format (#2683)
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user