0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Fixed storage of MRR Events type

This was incorrectly attempting to store the `name` column which was
renamed to `type`
This commit is contained in:
Fabien "egg" O'Carroll 2022-04-12 11:17:39 +01:00
parent c8139e11c5
commit 4c7a7027a9

View file

@ -755,7 +755,7 @@ module.exports = class MemberRepository {
await this._MemberPaidSubscriptionEvent.add({
member_id: member.id,
source: 'stripe',
name: getEventName(originalStatus, updatedStatus),
type: getEventName(originalStatus, updatedStatus),
subscription_id: updated.id,
from_plan: model.get('plan_id'),
to_plan: updated.get('status') === 'canceled' ? null : updated.get('plan_id'),
@ -769,7 +769,7 @@ module.exports = class MemberRepository {
await this._MemberPaidSubscriptionEvent.add({
member_id: member.id,
subscription_id: model.id,
name: 'created',
type: 'created',
source: 'stripe',
from_plan: null,
to_plan: subscriptionPriceData.id,