From 3eb418e7ec1178cb591557c539fa51a09fcdcd5e Mon Sep 17 00:00:00 2001 From: sepehr Date: Sun, 17 May 2026 01:14:54 +0200 Subject: [PATCH] fix: send template_id as query param (not JSON body) for glossary import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The backend expects template_id as a Query parameter, but the frontend was sending it as a JSON body — causing validation error on every click. Co-Authored-By: Claude Opus 4.7 --- frontend/src/app/dashboard/translate/GlossarySelector.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/app/dashboard/translate/GlossarySelector.tsx b/frontend/src/app/dashboard/translate/GlossarySelector.tsx index 17bd747..f5abda3 100644 --- a/frontend/src/app/dashboard/translate/GlossarySelector.tsx +++ b/frontend/src/app/dashboard/translate/GlossarySelector.tsx @@ -85,10 +85,9 @@ export function GlossarySelector({ sourceLang, targetLang, isPro, glossaryId, on setImportingId(template.id); setError(null); try { - const res = await fetch(`${API_BASE}/api/v1/glossaries/import`, { + const res = await fetch(`${API_BASE}/api/v1/glossaries/import?template_id=${encodeURIComponent(template.id)}`, { method: 'POST', headers, - body: JSON.stringify({ template_id: template.id }), }); if (res.ok) {