0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Added tier type in API response

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

Tiers now have a `type` column to differentiate between `free` and `paid` tiers. This change allows `type` data for a tier in Admin and Portal API output.
This commit is contained in:
Rishabh 2022-01-11 19:27:20 +05:30 committed by Rishabh Garg
parent e54395eab5
commit 345eb5828c
2 changed files with 2 additions and 0 deletions

View file

@ -73,6 +73,7 @@ function serializeProduct(product, options, apiType) {
name: json.name,
description: json.description,
slug: json.slug,
type: json.type,
created_at: json.created_at,
updated_at: json.updated_at,
stripe_prices: json.stripePrices ? json.stripePrices.map(price => serializeStripePrice(price, hideStripeData)) : null,

View file

@ -109,6 +109,7 @@ const getPortalProductPrices = async function () {
monthlyPrice: product.monthlyPrice,
yearlyPrice: product.yearlyPrice,
benefits: product.benefits,
type: product.type,
prices: productPrices
};
});