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
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user