Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit c52b5ec

Browse files
psarnaMarinPostma
andauthored
Update sqld/src/http/admin/mod.rs
Co-authored-by: ad hoc <postma.marin@protonmail.com>
1 parent dd5a025 commit c52b5ec

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

sqld/src/http/admin/mod.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async fn handle_get_config<M: MakeNamespace>(
8383

8484
async fn handle_diagnostics<M: MakeNamespace>(
8585
State(app_state): State<Arc<AppState<M>>>,
86-
) -> crate::Result<hyper::Response<hyper::Body>> {
86+
) -> crate::Result<Json<Vec<String>>> {
8787
use crate::connection::Connection;
8888
use hrana::http::stream;
8989

@@ -105,11 +105,7 @@ async fn handle_diagnostics<M: MakeNamespace>(
105105
drop(stream_state);
106106

107107
tracing::trace!("diagnostics: {diagnostics:?}");
108-
Ok(hyper::Response::builder()
109-
.status(hyper::StatusCode::OK)
110-
.header(hyper::http::header::CONTENT_TYPE, "application/json")
111-
.body(serde_json::to_string(&diagnostics)?.into())
112-
.unwrap())
108+
Ok(diagnostics)
113109
}
114110

115111
#[derive(Debug, Deserialize)]

0 commit comments

Comments
 (0)