mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
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:
parent
8d754a592e
commit
d196d9b525
1 changed files with 2 additions and 1 deletions
|
@ -81,7 +81,7 @@ const updateMemberData = async function (req, res) {
|
||||||
|
|
||||||
const getPortalProductPrices = async function () {
|
const getPortalProductPrices = async function () {
|
||||||
const page = await membersService.api.productRepository.list({
|
const page = await membersService.api.productRepository.list({
|
||||||
withRelated: ['monthlyPrice', 'yearlyPrice']
|
withRelated: ['monthlyPrice', 'yearlyPrice', 'benefits']
|
||||||
});
|
});
|
||||||
|
|
||||||
const products = page.data.map((productModel) => {
|
const products = page.data.map((productModel) => {
|
||||||
|
@ -99,6 +99,7 @@ const getPortalProductPrices = async function () {
|
||||||
description: product.description || '',
|
description: product.description || '',
|
||||||
monthlyPrice: product.monthlyPrice,
|
monthlyPrice: product.monthlyPrice,
|
||||||
yearlyPrice: product.yearlyPrice,
|
yearlyPrice: product.yearlyPrice,
|
||||||
|
benefits: product.benefits,
|
||||||
prices: productPrices
|
prices: productPrices
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue