mirror of
https://github.com/immich-app/immich.git
synced 2026-02-28 01:29:04 +03:00
refactor: user admin service (#23785)
This commit is contained in:
@@ -15,7 +15,6 @@ export const handleDeleteAlbum = async (album: AlbumResponseDto, options?: { pro
|
||||
? $t('album_delete_confirmation', { values: { album: album.albumName } })
|
||||
: $t('unnamed_album_delete_confirmation');
|
||||
const description = $t('album_delete_confirmation_description');
|
||||
|
||||
const success = await modalManager.showDialog({ prompt: `${confirmation} ${description}` });
|
||||
if (!success) {
|
||||
return false;
|
||||
@@ -24,13 +23,10 @@ export const handleDeleteAlbum = async (album: AlbumResponseDto, options?: { pro
|
||||
|
||||
try {
|
||||
await deleteAlbum({ id: album.id });
|
||||
|
||||
eventManager.emit('AlbumDelete', album);
|
||||
|
||||
if (notify) {
|
||||
toastManager.success();
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
handleError(error, $t('errors.unable_to_delete_album'));
|
||||
|
||||
Reference in New Issue
Block a user