@@ -22,7 +22,7 @@ use crate::common::util::{
2222} ;
2323use crate :: store:: { Repository , StoreClient , StoreRepository } ;
2424use crate :: upload:: domain:: { DownloadBulkRequestUriParams , FindAllQueryParams } ;
25- use crate :: upload:: service:: { FileService , write_field_to_temp_file} ;
25+ use crate :: upload:: service:: { FileService , write_field_to_temp_file} ;
2626
2727use super :: domain:: {
2828 DownloadFileRequestUriParams , FileRouterState , FileUploadV2 , UploadFileRequestUriParams ,
@@ -36,7 +36,6 @@ pub async fn make_state(client: StoreClient) -> Result<FileRouterState, Box<dyn
3636 } )
3737}
3838
39-
4039#[ utoipa:: path(
4140 get,
4241 path = "/api/v1/upload/metadata" ,
@@ -72,7 +71,9 @@ pub async fn metadata(
7271 // security(("bearerAuth" = []))
7372) ]
7473pub async fn download_bulk (
75- State ( FileRouterState { client, collection } ) : State < FileRouterState > ,
74+ State ( FileRouterState {
75+ client, collection, ..
76+ } ) : State < FileRouterState > ,
7677 Json ( DownloadBulkRequestUriParams { ids } ) : Json < DownloadBulkRequestUriParams > ,
7778) -> axum:: response:: Result < axum:: response:: Response > {
7879 tracing:: debug!( "Download bulk route entered!" ) ;
@@ -124,8 +125,8 @@ pub async fn download(
124125 Query ( DownloadFileRequestUriParams { id } ) : Query < DownloadFileRequestUriParams > ,
125126) -> axum:: response:: Result < axum:: response:: Response > {
126127 tracing:: debug!( "Download route entered!" ) ;
127-
128128 tracing:: debug!( "trying to fetch document with id {id}" ) ;
129+
129130 match FileService :: get_file_upload ( & id, Some ( DEFAULT_TENANT . to_string ( ) ) , & client, & collection)
130131 . await
131132 {
@@ -250,7 +251,9 @@ pub async fn ping() -> impl IntoResponse {
250251 // security(("bearerAuth" = []))
251252) ]
252253pub async fn make_thumb (
253- State ( FileRouterState { client, collection } ) : State < FileRouterState > ,
254+ State ( FileRouterState {
255+ client, collection, ..
256+ } ) : State < FileRouterState > ,
254257
255258 axum:: extract:: Path ( id) : axum:: extract:: Path < String > ,
256259) -> axum:: response:: Result < axum:: response:: Response > {
0 commit comments