feat: added default route to /login

This commit is contained in:
Maximilian Liebmann 2025-04-19 20:51:08 +02:00 committed by SomeCodecat
parent d43c0f78b4
commit 93b1fec364

View file

@ -1,2 +1,10 @@
import { handlers } from '@/auth'; // Referring to the auth.ts we just created
import { handlers } from '@/auth';
import { NextRequest, NextResponse } from 'next/server';
export const { GET, POST } = handlers;
export async function middleware(request: NextRequest) {
if (request.nextUrl.pathname === '/') {
return NextResponse.redirect(new URL('/login', request.url));
}
}