Enhance security and error handling in various components by refining error catch blocks to ignore specific errors, improving code clarity and consistency across the application.
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 4m10s
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 4m10s
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export default defineNuxtRouteMiddleware(async (to, from) => {
|
||||
export default defineNuxtRouteMiddleware(async (to, _from) => {
|
||||
// Check if route requires auth
|
||||
const protectedRoutes = ['/mitgliederbereich', '/cms']
|
||||
const requiresAuth = protectedRoutes.some(route => to.path.startsWith(route))
|
||||
@@ -33,7 +33,7 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
return navigateTo('/login?redirect=' + to.path)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user