Added benefits to product data in portal settings

refs https://github.com/TryGhost/Team/issues/838

- adds benefits data to product for portal UI
This commit is contained in:
Rishabh 2021-06-30 14:51:29 +05:30
parent 8d754a592e
commit d196d9b525

View File

@ -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
};
});