fix: Restore option missing in archived documents
This commit is contained in:
@@ -157,7 +157,11 @@ router.post('documents.archived', auth(), pagination(), async ctx => {
|
||||
const user = ctx.state.user;
|
||||
const collectionIds = await user.collectionIds();
|
||||
|
||||
const documents = await Document.findAll({
|
||||
const collectionScope = { method: ['withCollection', user.id] };
|
||||
const documents = await Document.scope(
|
||||
'defaultScope',
|
||||
collectionScope
|
||||
).findAll({
|
||||
where: {
|
||||
teamId: user.teamId,
|
||||
collectionId: collectionIds,
|
||||
|
||||
Reference in New Issue
Block a user