Return empty value if nothing is found.

This commit is contained in:
Martin Brodbeck 2023-09-26 21:55:28 +02:00
parent cd2b0558ad
commit 7d5852efdd

View file

@ -173,18 +173,7 @@ async fn get_progress(
.unwrap_or_default(); .unwrap_or_default();
if values.is_empty() { if values.is_empty() {
let res = GetProgress { return (StatusCode::OK, Json(json!({})));
percentage: 0.0f32,
progress: String::new(),
device: String::new(),
device_id: String::new(),
timestamp: 0,
document,
};
return (
StatusCode::OK,
Json(json!({})),
);
} }
let res = GetProgress { let res = GetProgress {