fix: use dynamic recipeLang in API calls instead of hardcoded /api/rezepte
Client-side navigation to /recipes hung because getUserFavorites and other endpoints were hardcoded to /api/rezepte, causing fetch mismatches during SvelteKit's client-side routing.
This commit is contained in:
@@ -284,7 +284,7 @@
|
||||
const apiBase = `/api/${isEnglish ? 'recipes' : 'rezepte'}`;
|
||||
const [tagsRes, iconsRes] = await Promise.all([
|
||||
fetch(`${apiBase}/items/tag`),
|
||||
fetch('/api/rezepte/items/icon')
|
||||
fetch(`${apiBase}/items/icon`)
|
||||
]);
|
||||
availableTags = await tagsRes.json();
|
||||
availableIcons = await iconsRes.json();
|
||||
|
||||
Reference in New Issue
Block a user