mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-06 01:48:32 +02:00
♻️ Update relational model (#1472)
This commit is contained in:
parent
f7b0e7b820
commit
f764ea9846
6 changed files with 219 additions and 165 deletions
|
@ -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: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue