update_progress seems to work now

This commit is contained in:
Martin Brodbeck 2023-09-26 15:53:10 +02:00
parent c870aa8c93
commit 2fea6062f5

View file

@ -18,7 +18,7 @@ pub struct User {
pub struct Progress { pub struct Progress {
document: String, document: String,
progress: String, progress: String,
percentage: String, percentage: f32,
device: String, device: String,
device_id: String, device_id: String,
} }
@ -120,7 +120,7 @@ async fn update_progress(headers: HeaderMap, Json(payload): Json<Progress>) -> S
.hset_multiple( .hset_multiple(
&doc_key, &doc_key,
&[ &[
("percentage", &payload.percentage), ("percentage", &payload.percentage.to_string()),
("progress", &payload.progress), ("progress", &payload.progress),
("device", &payload.device), ("device", &payload.device),
("device_id", &payload.device_id), ("device_id", &payload.device_id),