...
This commit is contained in:
parent
1b1f0f7e68
commit
0848e5bd5d
1 changed files with 4 additions and 3 deletions
|
@ -167,12 +167,13 @@ async fn get_progress(
|
||||||
doc_key,
|
doc_key,
|
||||||
&["percentage", "progress", "device", "device_id", "timestamp"],
|
&["percentage", "progress", "device", "device_id", "timestamp"],
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap_or_default();
|
||||||
|
|
||||||
if values.is_empty() {
|
if values.is_empty() {
|
||||||
|
println!("nicht gefunden");
|
||||||
return (
|
return (
|
||||||
StatusCode::FORBIDDEN,
|
StatusCode::FORBIDDEN,
|
||||||
Json(json!(r#""message": "Field 'document' not provided."#)),
|
Json(json!({"message": "Field 'document' not provided."})),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,5 +190,5 @@ async fn get_progress(
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn healthcheck() -> (StatusCode, Json<Value>) {
|
async fn healthcheck() -> (StatusCode, Json<Value>) {
|
||||||
(StatusCode::OK, Json(json!("{ \"state\" : \"OK\" }")))
|
(StatusCode::OK, Json(json!({ "state" : "OK" })))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue