chore(lint): manual fixes - remove redundant global declarations; add safe getMethod fallback; remove unused catch vars
Some checks failed
Code Analysis and Production Deploy / deploy-production (push) Has been cancelled
Code Analysis and Production Deploy / deploy-test (push) Has been cancelled
Code Analysis and Production Deploy / analyze (push) Has been cancelled

This commit is contained in:
Torsten Schulz (local)
2026-05-27 20:00:48 +02:00
parent 19d2f21fc3
commit 512756cb48
4 changed files with 9 additions and 3 deletions

View File

@@ -13,7 +13,9 @@ export default defineEventHandler(async (event) => {
setHeader(event, 'Access-Control-Allow-Headers', 'Content-Type, Authorization')
}
if (getMethod(event) === 'OPTIONS') {
// Provide a safe fallback for getMethod when linting/runtime doesn't expose it
const _getMethod = typeof getMethod === 'function' ? getMethod : (e) => (e?.req?.method || e?.method || 'GET')
if (_getMethod(event) === 'OPTIONS') {
return { success: true }
}