feat: Auto remove cancelled subscriptions

This commit is contained in:
Faruk AYDIN
2023-04-11 23:19:11 +02:00
parent 596be24d92
commit d1344457dd
6 changed files with 89 additions and 6 deletions

View File

@@ -25,10 +25,6 @@ const handleSubscriptionCancelled = async (request: IRequest) => {
});
await subscription.$query().patchAndFetch(formatSubscription(request));
// Have a background job that deletes the subscription in cancellation effective date
// Architect in a way that it will behave as cron.
// await subscription.$query().delete();
};
const handleSubscriptionPaymentSucceeded = async (request: IRequest) => {