From 7e3dfded2d02f004c82789006e44399260926bbe Mon Sep 17 00:00:00 2001 From: Jessica Lawshe <5312836+lawshe@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:33:49 -0500 Subject: [PATCH] Merge pull request #17821 from overleaf/jel-subscription-populate [web] Only populate the required admin data for the subscription GitOrigin-RevId: 4c2de85ce9f26b337deeff491b40d74756f21702 --- .../app/src/Features/Subscription/SubscriptionLocator.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/services/web/app/src/Features/Subscription/SubscriptionLocator.js b/services/web/app/src/Features/Subscription/SubscriptionLocator.js index 4a4d4cb1f2..3d0efddff4 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionLocator.js +++ b/services/web/app/src/Features/Subscription/SubscriptionLocator.js @@ -23,20 +23,18 @@ const SubscriptionLocator = { }, async getManagedGroupSubscriptions(userOrId) { - // eslint-disable-next-line no-restricted-syntax return await Subscription.find({ manager_ids: userOrId, groupPlan: true, }) - .populate('admin_id') + .populate('admin_id', ['_id', 'email']) .exec() }, async getMemberSubscriptions(userOrId) { const userId = SubscriptionLocator._getUserId(userOrId) - // eslint-disable-next-line no-restricted-syntax return await Subscription.find({ member_ids: userId }) - .populate('admin_id') + .populate('admin_id', 'email') .exec() },