Skip to content

Commit

Permalink
fix(share): 🐛 Delete domain when Vercel doesn't have it
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed May 2, 2022
1 parent 1becdad commit 28710dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/builder/pages/api/users/[id]/customDomains/[domain].ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
if (user.id !== id) return res.status(401).send({ message: 'Forbidden' })
if (req.method === 'DELETE') {
const domain = req.query.domain.toString()
await deleteDomainOnVercel(domain)
try {
await deleteDomainOnVercel(domain)
} catch {}
const customDomains = await prisma.customDomain.delete({
where: { name: domain },
})
Expand Down

4 comments on commit 28710dd

@vercel
Copy link

@vercel vercel bot commented on 28710dd May 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 28710dd May 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 28710dd May 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-typebot-io.vercel.app
app.typebot.io
builder-v2-git-main-typebot-io.vercel.app

Please sign in to comment.