mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Added visible
property to Tiers API
refs https://github.com/TryGhost/Team/issues/1387 This is also added to the Products API so that the Admin can use it without having to switch to the new Tiers API.
This commit is contained in:
parent
5fbfdf011e
commit
c00b398abf
3 changed files with 5 additions and 1 deletions
|
@ -74,6 +74,7 @@ function serializeProduct(product, options, apiType) {
|
|||
description: json.description,
|
||||
slug: json.slug,
|
||||
active: json.active,
|
||||
visible: json.visible,
|
||||
type: json.type,
|
||||
welcome_page_url: json.welcome_page_url,
|
||||
created_at: json.created_at,
|
||||
|
|
|
@ -81,7 +81,8 @@ function serializeTier(tier, options, apiType) {
|
|||
stripe_prices: json.stripePrices ? json.stripePrices.map(price => serializeStripePrice(price, hideStripeData)) : null,
|
||||
monthly_price: serializeStripePrice(json.monthlyPrice, hideStripeData),
|
||||
yearly_price: serializeStripePrice(json.yearlyPrice, hideStripeData),
|
||||
benefits: json.benefits || null
|
||||
benefits: json.benefits || null,
|
||||
visible: json.visible
|
||||
};
|
||||
|
||||
return serialized;
|
||||
|
|
|
@ -24,6 +24,7 @@ Object {
|
|||
"stripe_prices": null,
|
||||
"type": "free",
|
||||
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
||||
"visible": false,
|
||||
"welcome_page_url": "/welcome-free",
|
||||
},
|
||||
Object {
|
||||
|
@ -37,6 +38,7 @@ Object {
|
|||
"stripe_prices": null,
|
||||
"type": "paid",
|
||||
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
||||
"visible": false,
|
||||
"welcome_page_url": "/welcome-paid",
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Add table
Reference in a new issue