Fix delete action for hidden photos
This commit is contained in:
parent
17c4b54478
commit
8d525820db
@ -239,7 +239,7 @@ export const toggleFavoritePhotoAction = async (
|
|||||||
export const deletePhotosAction = async (photoIds: string[]) =>
|
export const deletePhotosAction = async (photoIds: string[]) =>
|
||||||
runAuthenticatedAdminServerAction(async () => {
|
runAuthenticatedAdminServerAction(async () => {
|
||||||
for (const photoId of photoIds) {
|
for (const photoId of photoIds) {
|
||||||
const photo = await getPhoto(photoId);
|
const photo = await getPhoto(photoId, true);
|
||||||
if (photo) {
|
if (photo) {
|
||||||
await deletePhoto(photoId).then(() => deleteFile(photo.url));
|
await deletePhoto(photoId).then(() => deleteFile(photo.url));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user