added forgotten check for remove file from slate

This commit is contained in:
Martina 2021-10-13 13:39:49 -07:00
parent c28b532179
commit c6cd40a679

View File

@ -36,6 +36,12 @@ export default async (req, res) => {
});
}
if (slate.ownerId !== id) {
return res
.status(403)
.send({ decorator: "SERVER_REMOVE_FROM_SLATE_SLATE_NOT_FOUND", error: true });
}
let response = await Data.deleteSlateFiles({ slateId: slate.id, ids: fileIds });
if (!response || response.error) {