From 86f008293a7696b2b08594eb0592e561bee2cb41 Mon Sep 17 00:00:00 2001 From: Saumya Pandey Date: Sat, 28 Aug 2021 08:33:57 +0530 Subject: [PATCH] fix: Return memberships of collections (#2501) --- server/api/documents.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/api/documents.js b/server/api/documents.js index bda3fe6cc..ecdd95a71 100644 --- a/server/api/documents.js +++ b/server/api/documents.js @@ -383,7 +383,9 @@ router.post("documents.starred", auth(), pagination(), async (ctx) => { }, include: [ { - model: Collection, + model: Collection.scope({ + method: ["withMembership", user.id], + }), as: "collection", }, {