Skip to content

Commit

Permalink
chore: fixes counting in comments
Browse files Browse the repository at this point in the history
Fixes counting so it continues to increase 1, 2, 3, 4, 5
  • Loading branch information
jordyfontoura committed Sep 25, 2024
1 parent 6c47eaa commit c3be4fc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1059,12 +1059,12 @@ export default async function middleware(req: NextRequest) {
const cookie = cookies().get('session')?.value
const session = await decrypt(cookie)

// 5. Redirect to /login if the user is not authenticated
// 4. Redirect to /login if the user is not authenticated
if (isProtectedRoute && !session?.userId) {
return NextResponse.redirect(new URL('/login', req.nextUrl))
}

// 6. Redirect to /dashboard if the user is authenticated
// 5. Redirect to /dashboard if the user is authenticated
if (
isPublicRoute &&
session?.userId &&
Expand Down

0 comments on commit c3be4fc

Please sign in to comment.