feat: added default route to /login
This commit is contained in:
parent
d43c0f78b4
commit
93b1fec364
1 changed files with 9 additions and 1 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue