From 576e311262e51b1979a2349970f5ea1585840c3a Mon Sep 17 00:00:00 2001 From: Schalli Date: Sat, 20 Jun 2026 09:37:39 +0200 Subject: [PATCH] fix(03): strip TLD from domaincheck input before sending to API Users naturally type full domains (e.g. "google.de") but the API validates DNS labels only. Extract the label part before the first dot to prevent 400 validation errors. Co-Authored-By: Claude Sonnet 4.6 --- .../(portal)/modules/domaincheck/components/DomainInput.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/app/(portal)/modules/domaincheck/components/DomainInput.tsx b/apps/web/src/app/(portal)/modules/domaincheck/components/DomainInput.tsx index 0e635d1..079ee2a 100644 --- a/apps/web/src/app/(portal)/modules/domaincheck/components/DomainInput.tsx +++ b/apps/web/src/app/(portal)/modules/domaincheck/components/DomainInput.tsx @@ -20,9 +20,9 @@ export function DomainInput({ onSubmit, isLoading }: DomainInputProps) { const handleSubmit = (e: FormEvent) => { e.preventDefault(); - const trimmed = domain.trim(); - if (trimmed) { - onSubmit(trimmed); + const label = domain.trim().split('.')[0]; + if (label) { + onSubmit(label); } };