fix: Correct invoice template API endpoints from /admin to /session
The frontend was using /admin/invoice-template but the backend endpoints are at /api/session/invoice-template. This caused 404 errors and the misleading message 'Template-Speicherung ist auf diesem Server nicht verfuegbar'.
This commit is contained in:
@@ -1150,7 +1150,7 @@ export default function InvoiceTemplatePage() {
|
||||
setTemplateError(null);
|
||||
setIsTemplateLoading(true);
|
||||
|
||||
void apiGet<InvoiceTemplateResponse>("/admin/invoice-template")
|
||||
void apiGet<InvoiceTemplateResponse>("/session/invoice-template")
|
||||
.then((response) => {
|
||||
if (cancelled) {
|
||||
return;
|
||||
@@ -1478,7 +1478,7 @@ export default function InvoiceTemplatePage() {
|
||||
setIsTemplateSaving(true);
|
||||
|
||||
try {
|
||||
const response = await apiPut<InvoiceTemplateResponse>("/admin/invoice-template", {
|
||||
const response = await apiPut<InvoiceTemplateResponse>("/session/invoice-template", {
|
||||
elements,
|
||||
});
|
||||
const savedElements = normalizeTemplateElements(response.elements);
|
||||
|
||||
Reference in New Issue
Block a user