fix: Missing options in document menu for trashed documents

This commit is contained in:
Tom Moor
2024-04-29 09:32:39 -04:00
parent 167467e8ea
commit 416cb0ceb9
2 changed files with 10 additions and 0 deletions

View File

@@ -256,6 +256,9 @@ router.post(
const collectionIds = await user.collectionIds({
paranoid: false,
});
const membershipScope: Readonly<ScopeOptions> = {
method: ["withMembership", user.id],
};
const collectionScope: Readonly<ScopeOptions> = {
method: ["withCollectionPermissions", user.id],
};
@@ -263,6 +266,7 @@ router.post(
method: ["withViews", user.id],
};
const documents = await Document.scope([
membershipScope,
collectionScope,
viewScope,
"withDrafts",