let user know when his cancelled sub is going to expire

This commit is contained in:
m5r
2021-10-03 20:56:31 +02:00
parent 5f3060c591
commit a28d89a8c2
7 changed files with 40 additions and 25 deletions

View File

@ -8,7 +8,7 @@ export default resolver.pipe(resolver.authorize(), async (_ = null, { session })
return db.subscription.findFirst({
where: {
organizationId: session.orgId,
status: { not: SubscriptionStatus.deleted },
OR: [{ status: { not: SubscriptionStatus.deleted } }, { cancellationEffectiveDate: { gt: new Date() } }],
},
});
});