Add Endpoint for Batch add/removal of tags on a file

This commit is contained in:
Cameron Cordes
2023-03-19 12:13:04 -04:00
parent f98d3261a7
commit 8bcd9440bf
2 changed files with 47 additions and 5 deletions

View File

@@ -489,6 +489,7 @@ fn main() -> std::io::Result<()> {
.route(web::delete().to(remove_tagged_photo::<SqliteTagDao>)),
)
.service(web::resource("image/tags/all").route(web::get().to(get_all_tags::<SqliteTagDao>)))
.service(web::resource("image/tags/batch").route(web::post().to(update_tags::<SqliteTagDao>)))
.app_data(app_data.clone())
.app_data::<Data<Mutex<SqliteUserDao>>>(Data::new(Mutex::new(user_dao)))
.app_data::<Data<Mutex<Box<dyn FavoriteDao>>>>(Data::new(Mutex::new(Box::new(