mirror of
https://github.com/outline/outline.git
synced 2026-11-27 16:08:58 +03:00
fix: Include withDrafts in groupMemberships.list
This commit is contained in:
1 file changed
+7
-5
@@ -58,11 +58,13 @@ router.post(
|
||||
const documentIds = memberships
|
||||
.map((p) => p.documentId)
|
||||
.filter(Boolean) as string[];
|
||||
const documents = await Document.withUserScope(userId).findAll({
|
||||
where: {
|
||||
id: documentIds,
|
||||
},
|
||||
});
|
||||
const documents = await Document.withUserScope(userId)
|
||||
.scope("withDrafts")
|
||||
.findAll({
|
||||
where: {
|
||||
id: documentIds,
|
||||
},
|
||||
});
|
||||
|
||||
const groups = uniqBy(
|
||||
memberships.map((membership) => membership.group),
|
||||
|
||||
Reference in new issue
Block a user