From 42e2a643904203dfb633ed0630c3b01d33b2bbb0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 25 Apr 2026 20:34:06 +0000 Subject: [PATCH] fix: redirect unauthenticated check-in users to /check-in/login instead of leaders /login Agent-Logs-Url: https://github.com/tasaboia/P40/sessions/d96bc918-5e17-401d-89f6-3a852511db78 Co-authored-by: tasaboia <11961423+tasaboia@users.noreply.github.com> --- src/middleware.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/middleware.ts b/src/middleware.ts index 64ff6b1..d6ebf03 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -49,6 +49,12 @@ export default async function middleware(req: NextRequest) { } if (!session && !isPublicPage) { + const isCheckInPath = pathname.includes("/check-in"); + if (isCheckInPath) { + return NextResponse.redirect( + new URL(`/${locale}/check-in/login`, req.url) + ); + } return NextResponse.redirect(new URL(`/${locale}/login`, req.url)); }