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:
@@ -1,17 +0,0 @@
|
||||
// utils/cookie.js
|
||||
|
||||
/**
|
||||
* @param {Request} request
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getJWTFromRequest(request) {
|
||||
const cookies = request.headers.get("cookie") || '';
|
||||
/** @param {string} cookie */
|
||||
const jwtCookie = cookies.split(';').find(cookie => cookie.trim().startsWith('UserSession='));
|
||||
|
||||
if (jwtCookie) {
|
||||
return jwtCookie.split('=')[1] || '';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
Reference in New Issue
Block a user