Skip to content

Commit

Permalink
delete the logo when customer.subscription.deleted occur
Browse files Browse the repository at this point in the history
  • Loading branch information
devkiran committed Nov 22, 2024
1 parent 1b1415f commit 394f64e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/web/app/api/stripe/webhook/customer-subscription-deleted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ export async function customerSubscriptionDeleted(event: Stripe.Event) {
},
}),

// remove logo from all domains for the workspace
prisma.domain.updateMany({
where: {
projectId: workspace.id,
},
data: {
logo: null,
},
}),

// remove root domain link for all domains from MySQL
prisma.link.updateMany({
where: {
Expand Down

0 comments on commit 394f64e

Please sign in to comment.