refactor: merge api/recipes and api/rezepte into unified recipeLang route

Consolidate duplicate recipe API routes into a single
api/[recipeLang=recipeLang]/ structure. Both /api/recipes/ and
/api/rezepte/ URLs continue to work via the param matcher. Shared
read endpoints now serve both languages with caching for both.

Also: remove dead code (5 unused components, cookie.js) and the
redundant cron-execute recurring payment route.
This commit is contained in:
2026-02-11 09:49:44 +01:00
parent 8560077759
commit ac4c00a082
65 changed files with 479 additions and 2344 deletions

View File

@@ -2,8 +2,7 @@ import type { PageServerLoad } from "./$types";
import { getUserFavorites, addFavoriteStatusToRecipes } from "$lib/server/favorites";
export const load: PageServerLoad = async ({ fetch, locals, params }) => {
const isEnglish = params.recipeLang === 'recipes';
const apiBase = isEnglish ? '/api/recipes' : '/api/rezepte';
const apiBase = `/api/${params.recipeLang}`;
let current_month = new Date().getMonth() + 1
const res_season = await fetch(`${apiBase}/items/in_season/` + current_month);