Cleaning up

This commit is contained in:
2025-05-15 16:53:21 -05:00
parent 5dcf2ed423
commit 40ab2d8450
10 changed files with 61 additions and 286 deletions

View File

@@ -41,13 +41,13 @@ export const updateSession = async (request: NextRequest) => {
const user = await supabase.auth.getUser();
// protected routes
if (request.nextUrl.pathname.startsWith('/protected') && user.error) {
if (request.nextUrl.pathname.startsWith('/reset-password') && user.error) {
return NextResponse.redirect(new URL('/sign-in', request.url));
}
if (request.nextUrl.pathname === '/' && !user.error) {
return NextResponse.redirect(new URL('/protected', request.url));
}
//if (request.nextUrl.pathname === '/' && !user.error) {
//return NextResponse.redirect(new URL('/protected', request.url));
//}
return response;
} catch (e) {