all strings for json

This commit is contained in:
Bryan Stitt 2023-03-09 22:53:01 -08:00
parent babd215e69
commit 89853e24e5

@ -31,9 +31,14 @@ pub async fn health(
#[debug_handler]
pub async fn status_headers(headers: HeaderMap) -> impl IntoResponse {
let headers: HashMap<Option<String>, String> = headers
let headers: HashMap<String, String> = headers
.into_iter()
.map(|(k, v)| (k.map(|k| k.to_string()), format!("{:?}", v)))
.map(|(k, v)| {
(
k.map(|k| k.to_string()).unwrap_or_default(),
format!("{:?}", v),
)
})
.collect();
let body = json!({ "headers": headers });