Skip to content

Commit 5ddc910

Browse files
committed
rollback cache
1 parent c29f95b commit 5ddc910

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/common/constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ pub static BODY_SIZE_LIMIT: LazyLock<usize> = LazyLock::new(|| {
6565
/*pub static CACHED_REDIS_CONNECTION_STRING: LazyLock<String> = LazyLock::new(|| {
6666
std::env::var("CACHED_REDIS_CONNECTION_STRING")
6767
.expect("CACHED_REDIS_CONNECTION_STRING must be set")
68-
});*/
68+
});*/

src/upload/routes.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use crate::common::util::{
2222
};
2323
use crate::store::{Repository, StoreClient, StoreRepository};
2424
use 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

2727
use 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
)]
7473
pub 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
)]
252253
pub 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> {

src/upload/service.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ pub struct FileService {
3434
pub store: StoreRepository<FileUploadV2>,
3535
}
3636

37-
38-
39-
4037
impl FileService {
4138
pub async fn get_file_upload(
4239
id: &str,

0 commit comments

Comments
 (0)