Updated serialisation for new site endpoint data

refs https://github.com/TryGhost/Team/issues/1599
This commit is contained in:
Rishabh 2022-05-12 20:47:24 +05:30
parent 5eb1131816
commit f7d3d56cb3

View File

@ -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