feat: add functionality to remove media from album, including API integration and UI context menu
This commit is contained in:
@@ -198,4 +198,19 @@ impl AlbumService for AlbumServiceImpl {
|
||||
|
||||
Ok(media)
|
||||
}
|
||||
|
||||
async fn remove_media_from_album(
|
||||
&self,
|
||||
album_id: Uuid,
|
||||
media_ids: &[Uuid],
|
||||
user_id: Uuid,
|
||||
) -> CoreResult<()> {
|
||||
self.auth_service
|
||||
.check_permission(Some(user_id), Permission::EditAlbum(album_id))
|
||||
.await?;
|
||||
|
||||
self.album_repo
|
||||
.remove_media_from_album(album_id, media_ids)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user