Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

added VAT settings & tax calculation

Steven Tey267c80525452
diff --git a/pages/api/projects/[slug]/domains/[domain]/index.ts b/pages/api/projects/[slug]/domains/[domain]/index.ts
index 57e8707200..4c02526e10 100644
--- a/pages/api/projects/[slug]/domains/[domain]/index.ts
+++ b/pages/api/projects/[slug]/domains/[domain]/index.ts
@@ -40,7 +40,7 @@ export default withProjectAuth(
return res.status(400).json({ error: "Domain already exists" });
}
const [removeResponse, addResponse, upstashResponse, prismaResponse] =
- await Promise.all([
+ await Promise.allSettled([
removeDomain(domain),
addDomain(newDomain),
prisma.project.update({
diff --git a/pages/api/stripe/upgrade.ts b/pages/api/stripe/upgrade.ts
index 7a1af339b9..76a7b6fb9c 100644
--- a/pages/api/stripe/upgrade.ts
+++ b/pages/api/stripe/upgrade.ts
@@ -28,6 +28,12 @@ export default withUserAuth(
: "http://app.localhost:3000"
}/settings`,
line_items: [{ price: priceId, quantity: 1 }],
+ automatic_tax: {
+ enabled: true,
+ },
+ tax_id_collection: {
+ enabled: true,
+ },
mode: "subscription",
client_reference_id: session.user.id,
});