feat: update ProjectE application

This commit is contained in:
2026-07-18 19:05:52 -04:00
parent 8f55626e03
commit 4c1cc50231
68 changed files with 1586 additions and 697 deletions
+5 -1
View File
@@ -5,7 +5,11 @@ export function middleware(request: NextRequest) {
const token = request.cookies.get('pb_auth')?.value;
// If no token and trying to access protected routes, redirect to login
if (!token && request.nextUrl.pathname.startsWith('/dashboard')) {
const protectedRoutes = [
'/dashboard', '/tasks', '/habits', '/projects', '/notes', '/reports',
'/calendar', '/analytics', '/agents', '/settings',
];
if (!token && protectedRoutes.some((route) => request.nextUrl.pathname === route || request.nextUrl.pathname.startsWith(`${route}/`))) {
const loginUrl = new URL('/login', request.url);
return NextResponse.redirect(loginUrl);
}