From cd2b0558ad682892f911c7dc15f953fdedba9008 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Tue, 26 Sep 2023 21:54:58 +0200 Subject: [PATCH 1/2] Version 1.0.0 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0459a5b..af9f5f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -278,7 +278,7 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "kosyncrs" -version = "0.1.0" +version = "1.0.0" dependencies = [ "axum", "redis", diff --git a/Cargo.toml b/Cargo.toml index 1e8a777..00623a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kosyncrs" -version = "0.1.0" +version = "1.0.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From 7d5852efdd8e67a69959970219b2fa287ccfff86 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Tue, 26 Sep 2023 21:55:28 +0200 Subject: [PATCH 2/2] Return empty value if nothing is found. --- src/main.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/main.rs b/src/main.rs index e526137..45cff86 100644 --- a/src/main.rs +++ b/src/main.rs @@ -173,18 +173,7 @@ 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::OK, - Json(json!({})), - ); + return (StatusCode::OK, Json(json!({}))); } let res = GetProgress {