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:
parent
9c498697c9
commit
22a211f1de
1 changed files with 4 additions and 4 deletions
|
@ -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'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue