fix: Enable documents.update with collab editing (#3647)

* fix: Enable documents.update with collab editing

* jest cannot deal with ESM deps
This commit is contained in:
Tom Moor
2022-06-20 16:36:25 +03:00
committed by GitHub
parent e0d2b6cace
commit 4b27feff61
4 changed files with 35 additions and 4 deletions

View File

@@ -853,6 +853,7 @@ router.post("documents.update", auth(), async (ctx) => {
const document = await sequelize.transaction(async (transaction) => {
const document = await Document.findByPk(id, {
userId: user.id,
includeState: true,
transaction,
});
authorize(user, "update", document);