From d196d9b5252873e6c669cb7786533395e8bb1191 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Wed, 30 Jun 2021 14:51:29 +0530 Subject: [PATCH] Added benefits to product data in portal settings refs https://github.com/TryGhost/Team/issues/838 - adds benefits data to product for portal UI --- core/server/services/members/middleware.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/server/services/members/middleware.js b/core/server/services/members/middleware.js index 4dbc3c78b3..34743a9bb9 100644 --- a/core/server/services/members/middleware.js +++ b/core/server/services/members/middleware.js @@ -81,7 +81,7 @@ const updateMemberData = async function (req, res) { const getPortalProductPrices = async function () { const page = await membersService.api.productRepository.list({ - withRelated: ['monthlyPrice', 'yearlyPrice'] + withRelated: ['monthlyPrice', 'yearlyPrice', 'benefits'] }); const products = page.data.map((productModel) => { @@ -99,6 +99,7 @@ const getPortalProductPrices = async function () { description: product.description || '', monthlyPrice: product.monthlyPrice, yearlyPrice: product.yearlyPrice, + benefits: product.benefits, prices: productPrices }; });