fix: Deleting a document should correctly show who deleted (#1488)

This commit is contained in:
Tom Moor
2020-08-25 08:51:12 -07:00
committed by GitHub
parent 69611638b9
commit 85d09b2351
3 changed files with 41 additions and 19 deletions

View File

@@ -1001,7 +1001,7 @@ router.post("documents.delete", auth(), async (ctx) => {
const document = await Document.findByPk(id, { userId: user.id });
authorize(user, "delete", document);
await document.delete();
await document.delete(user.id);
await Event.create({
name: "documents.delete",