test
This commit is contained in:
parent
7d7617783f
commit
aa8c0d5a2c
1 changed files with 10 additions and 2 deletions
12
src/main.rs
12
src/main.rs
|
@ -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)),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue