fix: JS error on server
This commit is contained in:
@ -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'
|
||||
|
Reference in New Issue
Block a user