From de663b2cd9a757e70c999efd0f3a98f7a9107bb9 Mon Sep 17 00:00:00 2001 From: klemek Date: Mon, 15 Jun 2026 22:47:22 +0200 Subject: [PATCH] fix: whois check --- src/lib/whois.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/whois.ts b/src/lib/whois.ts index c4e261f..f04956f 100644 --- a/src/lib/whois.ts +++ b/src/lib/whois.ts @@ -4,7 +4,12 @@ export async function isDomainAvailable(domain: string): Promise { `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; }