feat: update response
This commit is contained in:
@@ -85,7 +85,9 @@ async fn response_requests(
|
|||||||
(&Method::GET, "/version") => get_version().await,
|
(&Method::GET, "/version") => get_version().await,
|
||||||
_ => Ok(Response::builder()
|
_ => Ok(Response::builder()
|
||||||
.status(StatusCode::NOT_FOUND)
|
.status(StatusCode::NOT_FOUND)
|
||||||
.body(format!("{}\n", serde_json::to_string_pretty(&json!({ "error": "not_found" }))?).into())?),
|
.body(format!("{}\n", serde_json::to_string_pretty(&json!({
|
||||||
|
"error": "not_found",
|
||||||
|
}))?).into())?),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user