fix: Doc history does not load when linked to directly (race condition)

This commit is contained in:
Tom Moor
2020-04-05 13:20:47 -07:00
parent 9712b8d205
commit 3bd1c1f047
2 changed files with 19 additions and 25 deletions

View File

@ -439,7 +439,7 @@ router.post('documents.revisions', auth(), pagination(), async ctx => {
authorize(user, 'read', document);
const revisions = await Revision.findAll({
where: { documentId: id },
where: { documentId: document.id },
order: [[sort, direction]],
offset: ctx.state.pagination.offset,
limit: ctx.state.pagination.limit,