fix: whois check
Lint / ESLint (push) Successful in 11m58s
Deploy / Build (push) Successful in 12m0s
Lint / Oxlint (push) Successful in 11m58s
Lint / TypeScript (push) Successful in 11m29s
Deploy / Deploy to Stapler (push) Successful in 14m19s

This commit is contained in:
2026-06-15 22:47:22 +02:00
parent c9b956c28a
commit de663b2cd9
+6 -1
View File
@@ -4,7 +4,12 @@ export async function isDomainAvailable(domain: string): Promise<boolean> {
`https://whois.klemek.fr/api/lookup/${domain}`,
);
const content = await response.json();
return content?.data?.nameservers?.length === 0;
for (const event of content?.data?.events ?? []) {
if (event?.eventAction === "registration" && event?.eventDate === "") {
return true;
}
}
return false;
} catch {
return false;
}