improve postgresql performance
This commit is contained in:
@@ -311,6 +311,7 @@ pub struct AppState {
|
||||
pub share_service: Option<Arc<dyn crate::application::ports::share_ports::ShareUseCase>>,
|
||||
pub favorites_service: Option<Arc<dyn FavoritesUseCase>>,
|
||||
pub recent_service: Option<Arc<dyn RecentItemsUseCase>>,
|
||||
pub storage_usage_service: Option<Arc<dyn crate::application::ports::storage_ports::StorageUsagePort>>,
|
||||
}
|
||||
|
||||
impl Default for AppState {
|
||||
@@ -439,6 +440,14 @@ impl Default for AppState {
|
||||
async fn delete_file(&self, _id: &str) -> Result<(), crate::common::errors::DomainError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn get_folder_details(&self, _folder_id: &str) -> Result<crate::domain::entities::file::File, crate::common::errors::DomainError> {
|
||||
Ok(crate::domain::entities::file::File::default())
|
||||
}
|
||||
|
||||
async fn get_folder_path_str(&self, _folder_id: &str) -> Result<String, crate::common::errors::DomainError> {
|
||||
Ok("/Mi Carpeta - dummy".to_string())
|
||||
}
|
||||
}
|
||||
|
||||
struct DummyFileStoragePort;
|
||||
@@ -815,6 +824,7 @@ impl Default for AppState {
|
||||
share_service: None,
|
||||
favorites_service: None,
|
||||
recent_service: None,
|
||||
storage_usage_service: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -835,6 +845,7 @@ impl AppState {
|
||||
share_service: None,
|
||||
favorites_service: None,
|
||||
recent_service: None,
|
||||
storage_usage_service: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -867,4 +878,9 @@ impl AppState {
|
||||
self.recent_service = Some(recent_service);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_storage_usage_service(mut self, storage_usage_service: Arc<dyn crate::application::ports::storage_ports::StorageUsagePort>) -> Self {
|
||||
self.storage_usage_service = Some(storage_usage_service);
|
||||
self
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user