mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 14:45:36 +01:00
Fix
This commit is contained in:
@@ -27,12 +27,12 @@ async fn download_cached_file(
|
||||
Path((object_id, object_type)): Path<(i32, String)>,
|
||||
Extension(Ext { db }): Extension<Ext>
|
||||
) -> impl IntoResponse {
|
||||
let cached_file = match get_cached_file_or_cache(object_id, object_type, db).await {
|
||||
let cached_file = match get_cached_file_or_cache(object_id, object_type, db.clone()).await {
|
||||
Some(cached_file) => cached_file,
|
||||
None => return StatusCode::NO_CONTENT.into_response(),
|
||||
};
|
||||
|
||||
let data = match download_from_cache(cached_file).await {
|
||||
let data = match download_from_cache(cached_file, db).await {
|
||||
Some(v) => v,
|
||||
None => {
|
||||
return StatusCode::NO_CONTENT.into_response();
|
||||
|
||||
Reference in New Issue
Block a user