mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Handled Stripe Disconnect for Offers
refs https://github.com/TryGhost/Team/issues/1166 As usual we want to delete all Stripe related data on disconnect.
This commit is contained in:
parent
7a68dc2bd3
commit
1ae6a2ac44
1 changed files with 4 additions and 0 deletions
|
@ -49,6 +49,7 @@ module.exports = function MembersAPI({
|
|||
MemberProductEvent,
|
||||
MemberEmailChangeEvent,
|
||||
MemberAnalyticEvent,
|
||||
Offer,
|
||||
OfferRedemption,
|
||||
StripeProduct,
|
||||
StripePrice,
|
||||
|
@ -191,6 +192,9 @@ module.exports = function MembersAPI({
|
|||
await StripePrice.forge().query().del();
|
||||
await StripeProduct.forge().query().del();
|
||||
await StripeCustomer.forge().query().del();
|
||||
await Offer.forge().query().update({
|
||||
stripe_coupon_id: null
|
||||
});
|
||||
}
|
||||
|
||||
const ready = stripeAPIService.configured ? Promise.all([
|
||||
|
|
Loading…
Add table
Reference in a new issue