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.

simplify configure-dns

Steven Tey38fcd9279461
diff --git a/apps/web/lib/dynadot/configure-dns.ts b/apps/web/lib/dynadot/configure-dns.ts
index 82244b1edf..2e3d27c518 100644
--- a/apps/web/lib/dynadot/configure-dns.ts
+++ b/apps/web/lib/dynadot/configure-dns.ts
@@ -9,18 +9,9 @@ export const configureDNS = async ({ domain }: { domain: string }) => {
main_record0: "76.76.21.21",
});
- const response = await fetch(
- `${DYNADOT_BASE_URL}?${searchParams.toString()}`,
- {
- headers: {
- "Content-Type": "application/x-www-form-urlencoded",
- },
+ return fetch(`${DYNADOT_BASE_URL}?${searchParams.toString()}`, {
+ headers: {
+ "Content-Type": "application/x-www-form-urlencoded",
},
- );
-
- if (!response.ok) {
- throw new Error(`Failed to configure domain DNS: ${response.statusText}`);
- }
-
- return response.json();
+ });
};