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);
|
setTemplateError(null);
|
||||||
setIsTemplateLoading(true);
|
setIsTemplateLoading(true);
|
||||||
|
|
||||||
void apiGet<InvoiceTemplateResponse>("/admin/invoice-template")
|
void apiGet<InvoiceTemplateResponse>("/session/invoice-template")
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (cancelled) {
|
if (cancelled) {
|
||||||
return;
|
return;
|
||||||
@@ -1478,7 +1478,7 @@ export default function InvoiceTemplatePage() {
|
|||||||
setIsTemplateSaving(true);
|
setIsTemplateSaving(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await apiPut<InvoiceTemplateResponse>("/admin/invoice-template", {
|
const response = await apiPut<InvoiceTemplateResponse>("/session/invoice-template", {
|
||||||
elements,
|
elements,
|
||||||
});
|
});
|
||||||
const savedElements = normalizeTemplateElements(response.elements);
|
const savedElements = normalizeTemplateElements(response.elements);
|
||||||
|
|||||||
Reference in New Issue
Block a user