diff --git a/src/main.rs b/src/main.rs index a905449..a12256d 100644 --- a/src/main.rs +++ b/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)), ); }