fix(delete-files-by-ids): delete files from the likes table

This commit is contained in:
Aminejv 2021-08-13 20:40:43 +01:00
parent 3243e217ac
commit 79be77787f

View File

@ -32,6 +32,8 @@ export default async ({ ids, ownerId }) => {
await DB("slates").where("id", slateId).decrement("fileCount", count);
}
const likes = await DB("likes").whereIn("fileId", ids).del();
const activity = await DB("activity").whereIn("fileId", ids).del();
const files = await DB("files").whereIn("id", ids).del().returning("*");