♻️ Update relational model (#1472)

This commit is contained in:
Luke Vella 2024-12-28 10:48:52 +01:00 committed by GitHub
parent f7b0e7b820
commit f764ea9846
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 219 additions and 165 deletions

View file

@ -105,15 +105,6 @@ export async function POST(request: NextRequest) {
await stripe.invoices.voidInvoice(invoice.id);
}
// remove the subscription from the user
await prisma.user.update({
where: {
subscriptionId: subscription.id,
},
data: {
subscriptionId: null,
},
});
// delete the subscription from the database
await prisma.subscription.delete({
where: {