This commit is contained in:
2023-08-09 02:47:52 +02:00
parent 7f3fb20cb8
commit 041ff80313
2 changed files with 11 additions and 2 deletions

View File

@@ -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();