This commit is contained in:
Martin Brodbeck 2023-09-26 21:49:15 +02:00
parent 7d7617783f
commit aa8c0d5a2c

View file

@ -173,9 +173,17 @@ async fn get_progress(
.unwrap_or_default();
if values.is_empty() {
let res = GetProgress {
percentage: 0.0f32,
progress: String::new(),
device: String::new(),
device_id: String::new(),
timestamp: 0,
document,
};
return (
StatusCode::BAD_GATEWAY,
Json(json!({"message": "Field 'document' not provided."})),
StatusCode::OK,
Json(json!(res)),
);
}