Remove useless include

This commit is contained in:
Jori Lallo 2017-07-09 20:32:38 -07:00
parent 4c96f1ead0
commit b4c4a5d64c

View File

@ -208,9 +208,7 @@ router.post('documents.update', auth(), async ctx => {
ctx.assertPresent(title || text, 'title or text is required');
const user = ctx.state.user;
const document = await Document.findById(id, {
include: ['collection'],
});
const document = await Document.findById(id);
const collection = document.collection;
if (!document || document.teamId !== user.teamId) throw httpErrors.NotFound();