fix: send template_id as query param (not JSON body) for glossary import
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m19s

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 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 01:14:54 +02:00
parent 6ba39cc01b
commit 3eb418e7ec

View File

@@ -85,10 +85,9 @@ export function GlossarySelector({ sourceLang, targetLang, isPro, glossaryId, on
setImportingId(template.id); setImportingId(template.id);
setError(null); setError(null);
try { 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', method: 'POST',
headers, headers,
body: JSON.stringify({ template_id: template.id }),
}); });
if (res.ok) { if (res.ok) {