mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 06:35:38 +01:00
Update response codes
This commit is contained in:
@@ -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(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user