feat: add file serving endpoint GET /assets/:id/file
This commit is contained in:
@@ -6,7 +6,7 @@ use application::{
|
||||
};
|
||||
use std::sync::Arc;
|
||||
|
||||
use domain::ports::{StoragePort, TokenIssuer};
|
||||
use domain::ports::{AssetRepository, FileStoragePort, StoragePort, TokenIssuer};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct AppState {
|
||||
@@ -24,6 +24,8 @@ pub struct AppState {
|
||||
pub update_metadata_handler: Arc<UpdateMetadataHandler>,
|
||||
pub register_volume_handler: Arc<RegisterVolumeHandler>,
|
||||
pub register_library_path_handler: Arc<RegisterLibraryPathHandler>,
|
||||
pub file_storage: Arc<dyn FileStoragePort>,
|
||||
pub asset_repo: Arc<dyn AssetRepository>,
|
||||
}
|
||||
|
||||
impl AppState {
|
||||
@@ -43,6 +45,8 @@ impl AppState {
|
||||
update_metadata_handler: Arc<UpdateMetadataHandler>,
|
||||
register_volume_handler: Arc<RegisterVolumeHandler>,
|
||||
register_library_path_handler: Arc<RegisterLibraryPathHandler>,
|
||||
file_storage: Arc<dyn FileStoragePort>,
|
||||
asset_repo: Arc<dyn AssetRepository>,
|
||||
) -> Self {
|
||||
Self {
|
||||
register_handler,
|
||||
@@ -59,6 +63,8 @@ impl AppState {
|
||||
update_metadata_handler,
|
||||
register_volume_handler,
|
||||
register_library_path_handler,
|
||||
file_storage,
|
||||
asset_repo,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user