From 47ff6feaee330b7e66efd015481463beb885cc79 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 20 May 2020 21:03:53 -0700 Subject: [PATCH] fix: JS error on server --- server/api/documents.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/api/documents.js b/server/api/documents.js index 872ae511b..47648a6be 100644 --- a/server/api/documents.js +++ b/server/api/documents.js @@ -887,9 +887,9 @@ router.post('documents.move', auth(), async ctx => { const user = ctx.state.user; const document = await Document.findByPk(id, { userId: user.id }); - const { collection } = document; authorize(user, 'move', document); + const { collection } = document; if (collection.type !== 'atlas' && parentDocumentId) { throw new InvalidRequestError( 'Document cannot be nested in this collection type'