Update response codes

This commit is contained in:
2024-05-07 19:17:16 +02:00
parent e1982ba173
commit b59b82a080

View File

@@ -41,7 +41,7 @@ async fn get_cached_file(
) -> impl IntoResponse { ) -> impl IntoResponse {
let cached_file = match get_cached_file_or_cache(object_id, object_type, db.clone()).await { let cached_file = match get_cached_file_or_cache(object_id, object_type, db.clone()).await {
Some(cached_file) => cached_file, Some(cached_file) => cached_file,
None => return StatusCode::NOT_FOUND.into_response(), None => return StatusCode::NO_CONTENT.into_response(),
}; };
if !copy { if !copy {
@@ -131,7 +131,7 @@ async fn delete_cached_file(
Json(v).into_response() Json(v).into_response()
} }
None => StatusCode::NOT_FOUND.into_response(), None => StatusCode::NO_CONTENT.into_response(),
} }
} }