Also delete tag mappings

This commit is contained in:
Nameless 2021-11-03 18:31:02 +00:00
parent 90b124c2ab
commit 50d1a2dc34
1 changed files with 1 additions and 0 deletions

View File

@ -200,6 +200,7 @@ class Util {
try {
const fileIds = files.map(file => file.id);
await db.table('albumsFiles').whereIn('fileId', fileIds).delete(); // Delete album mappings
await db.table('fileTags').whereIn('id', fileIds).delete(); // Delete tag mappings
await db.table('files').whereIn('id', fileIds).delete(); // Delete file references
for (const file of files) {
// Delete file from storage