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.

getUrlFromString for verifyDomainAction

Steven Teybe639bad0a59
diff --git a/apps/web/lib/actions/partners/verify-domain.ts b/apps/web/lib/actions/partners/verify-domain.ts
index 673f1314f8..b9a1d15beb 100644
--- a/apps/web/lib/actions/partners/verify-domain.ts
+++ b/apps/web/lib/actions/partners/verify-domain.ts
@@ -1,6 +1,7 @@
"use server";
import { prisma } from "@dub/prisma";
+import { getUrlFromString } from "@dub/utils";
import dns from "dns";
import { authPartnerActionClient } from "../safe-action";
@@ -34,7 +35,7 @@ export const verifyDomainAction = authPartnerActionClient.action(
let domain: string | null = null;
try {
- domain = new URL(partnerPlatform.identifier).hostname;
+ domain = new URL(getUrlFromString(partnerPlatform.identifier)).hostname;
} catch (e) {
throw new Error("Please make sure the website is a valid URL.");
}