Enhance application structure: Add runtime configuration for environment variables, integrate new dependencies for Cloudinary and UI components, and refactor member management features including improved forms and member dashboard. Update styles and layout for better user experience.
This commit is contained in:
parent
6e7e27ac4e
commit
e4a0a9ab0f
61 changed files with 7902 additions and 950 deletions
18
app/middleware/admin.js
Normal file
18
app/middleware/admin.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
export default defineNuxtRouteMiddleware((to) => {
|
||||
// Skip middleware in server-side rendering to avoid errors
|
||||
if (process.server) return
|
||||
|
||||
// TODO: Temporarily disabled for testing - enable when authentication is set up
|
||||
// Check if user is authenticated (you'll need to implement proper auth state)
|
||||
// const isAuthenticated = useCookie('auth-token').value
|
||||
|
||||
// if (!isAuthenticated) {
|
||||
// throw createError({
|
||||
// statusCode: 401,
|
||||
// statusMessage: 'Authentication required'
|
||||
// })
|
||||
// }
|
||||
|
||||
// TODO: Add proper role-based authorization
|
||||
// For now, we assume anyone with a valid token is an admin
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue