Merged v5.13.1 into main

v5.13.1
This commit is contained in:
Daniel Lockyer 2022-09-06 10:12:54 +01:00
commit e0f86cb1cb
No known key found for this signature in database
GPG Key ID: D21186F0B47295AD
4 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "ghost-admin",
"version": "5.13.0",
"version": "5.13.1",
"description": "Ember.js admin client for Ghost",
"author": "Ghost Foundation",
"homepage": "http://ghost.org",

View File

@ -1,6 +1,6 @@
{
"name": "ghost",
"version": "5.13.0",
"version": "5.13.1",
"description": "The professional publishing platform",
"author": "Ghost Foundation",
"homepage": "https://ghost.org",

View File

@ -230,7 +230,8 @@ class StaffServiceEmails {
if (offer.type === 'percent') {
offAmount = `${offer.amount}% off`;
} else if (offer.type === 'fixed') {
offAmount = `${this.getFormattedAmount({currency: offer.currency, amount: offer.amount})} off`;
const amount = this.getAmount(offer.amount);
offAmount = `${this.getFormattedAmount({currency: offer.currency, amount})} off`;
} else if (offer.type === 'trial') {
offAmount = `${offer.amount} days free`;
}

View File

@ -308,7 +308,7 @@ describe('StaffService', function () {
duration_in_months: 3,
type: 'fixed',
currency: 'USD',
amount: 10
amount: 1000
};
await service.notifyPaidSubscriptionStart({member, offer, tier, subscription}, options);
@ -333,7 +333,7 @@ describe('StaffService', function () {
duration: 'forever',
type: 'fixed',
currency: 'USD',
amount: 20
amount: 2000
};
await service.notifyPaidSubscriptionStart({member, offer, tier, subscription}, options);