Fixed bug where deleting a file card wasn't possible if it was already deleted manually

This commit is contained in:
Isaac Abadi
2021-01-11 13:55:02 -05:00
parent a78f4e99d0
commit 133d848729

View File

@@ -2619,7 +2619,7 @@ app.post('/api/deleteFile', optionalJwt, async (req, res) => {
db.get('files').remove({uid: uid}).write();
wasDeleted = true;
res.send(wasDeleted);
} else if (video_obj) {
} else if (file_obj) {
db.get('files').remove({uid: uid}).write();
wasDeleted = true;
res.send(wasDeleted);