feat: Implement media import functionality with repository and bundle support
This commit is contained in:
@@ -152,10 +152,28 @@ pub async fn build_person_share_repository(
|
||||
) -> CoreResult<Arc<dyn libertas_core::repositories::PersonShareRepository>> {
|
||||
match pool {
|
||||
DatabasePool::Postgres(pg_pool) => Ok(Arc::new(
|
||||
crate::repositories::person_share_repository::PostgresPersonShareRepository::new(pg_pool),
|
||||
crate::repositories::person_share_repository::PostgresPersonShareRepository::new(
|
||||
pg_pool,
|
||||
),
|
||||
)),
|
||||
DatabasePool::Sqlite(_sqlite_pool) => Err(CoreError::Database(
|
||||
"Sqlite person share repository not implemented".to_string(),
|
||||
)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn build_media_import_repository(
|
||||
_db_config: &DatabaseConfig,
|
||||
pool: DatabasePool,
|
||||
) -> CoreResult<Arc<dyn libertas_core::repositories::MediaImportRepository>> {
|
||||
match pool {
|
||||
DatabasePool::Postgres(pg_pool) => Ok(Arc::new(
|
||||
crate::repositories::media_import_repository::PostgresMediaImportRepository::new(
|
||||
pg_pool,
|
||||
),
|
||||
)),
|
||||
DatabasePool::Sqlite(_sqlite_pool) => Err(CoreError::Database(
|
||||
"Sqlite media import repository not implemented".to_string(),
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user