mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Removed hasActiveStripeSubscriptions method (#396)
refs https://github.com/TryGhost/Team/issues/1147 This endpoint is no longer used in 5.0
This commit is contained in:
parent
0111e23fb7
commit
b717c90b22
@ -167,42 +167,6 @@ module.exports = function MembersAPI({
|
||||
tokenService
|
||||
});
|
||||
|
||||
async function hasActiveStripeSubscriptions() {
|
||||
const firstActiveSubscription = await StripeCustomerSubscription.findOne({
|
||||
status: 'active'
|
||||
});
|
||||
|
||||
if (firstActiveSubscription) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const firstTrialingSubscription = await StripeCustomerSubscription.findOne({
|
||||
status: 'trialing'
|
||||
});
|
||||
|
||||
if (firstTrialingSubscription) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const firstUnpaidSubscription = await StripeCustomerSubscription.findOne({
|
||||
status: 'unpaid'
|
||||
});
|
||||
|
||||
if (firstUnpaidSubscription) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const firstPastDueSubscription = await StripeCustomerSubscription.findOne({
|
||||
status: 'past_due'
|
||||
});
|
||||
|
||||
if (firstPastDueSubscription) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
const users = memberRepository;
|
||||
|
||||
async function sendEmailWithMagicLink({email, requestedType, tokenData, options = {forceEmailType: false}, requestSrc = ''}) {
|
||||
@ -334,7 +298,6 @@ module.exports = function MembersAPI({
|
||||
bus,
|
||||
sendEmailWithMagicLink,
|
||||
getMagicLink,
|
||||
hasActiveStripeSubscriptions,
|
||||
members: users,
|
||||
memberBREADService,
|
||||
events: eventRepository,
|
||||
|
Loading…
Reference in New Issue
Block a user