feat: implement media listing with sorting and filtering options
This commit is contained in:
@@ -15,5 +15,10 @@ pub fn load_config() -> CoreResult<Config> {
|
||||
broker_url: "nats://localhost:4222".to_string(),
|
||||
max_upload_size_mb: Some(100),
|
||||
default_storage_quota_gb: Some(10),
|
||||
allowed_sort_columns: Some(vec![
|
||||
"date_taken".to_string(),
|
||||
"created_at".to_string(),
|
||||
"original_filename".to_string(),
|
||||
]),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
let db_pool = build_database_pool(&config.database).await?;
|
||||
println!("Worker connected to database.");
|
||||
|
||||
let media_repo = build_media_repository(&config.database, db_pool.clone()).await?;
|
||||
let media_repo = build_media_repository(&config, db_pool.clone()).await?;
|
||||
let album_repo = build_album_repository(&config.database, db_pool.clone()).await?;
|
||||
let user_repo = build_user_repository(&config.database, db_pool.clone()).await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user