0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-25 02:31:59 -05:00

Fixed @price data when Stripe is not configured

no-issue

Themes which use the `@price` data will have a 400 error if they are not
setup prices. This adds default price data so that the theme will not
error.
This commit is contained in:
Fabien O'Carroll 2021-05-12 14:27:30 +01:00
parent 9c498697c9
commit 22a211f1de

View file

@ -50,9 +50,9 @@ function ensureActiveTheme(req, res, next) {
async function haxGetMembersPriceData() {
const defaultPrice = {
amount: 0,
currency: null,
interval: null,
nickname: null
currency: 'usd',
interval: 'year',
nickname: ''
};
function makePriceObject(price) {
@ -103,7 +103,7 @@ async function haxGetMembersPriceData() {
return {
monthly: makePriceObject(defaultPrice),
yearly: makePriceObject(defaultPrice),
currency: null
currency: 'usd'
};
}
}