diff --git a/src/router/upload.rs b/src/router/upload.rs index 99e9354..6f96026 100644 --- a/src/router/upload.rs +++ b/src/router/upload.rs @@ -74,8 +74,8 @@ async fn upload_to_zip( .map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))?; } - let mut records = state.records.lock().await; let record = UploadRecord::new(archive_path); + let mut records = state.records.lock().await; records.insert(cache_name.clone(), record.clone()); let records_cache = records.clone();