From f7d3d56cb3abf317d3dcfca969c1c46cee08efb8 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Thu, 12 May 2022 20:47:24 +0530 Subject: [PATCH] Updated serialisation for new site endpoint data refs https://github.com/TryGhost/Team/issues/1599 --- ghost/portal/src/utils/helpers.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ghost/portal/src/utils/helpers.js b/ghost/portal/src/utils/helpers.js index f70bdb5cca..46cf96307c 100644 --- a/ghost/portal/src/utils/helpers.js +++ b/ghost/portal/src/utils/helpers.js @@ -208,6 +208,14 @@ export function transformApiSiteData({site}) { site.products = site.tiers; } + site.products = site.products?.map((product) => { + return { + ...product, + monthlyPrice: product.monthly_price, + yearlyPrice: product.yearly_price + }; + }); + // Map tier visibility to old settings if (site.products?.[0]?.visibility) { // Map paid tier visibility to portal products