students fked up

This commit is contained in:
Om Lanke
2025-07-06 23:30:58 +05:30
parent 59f9c356ad
commit b43eece6f2
12 changed files with 657 additions and 97 deletions

View File

@@ -7,6 +7,11 @@ export default auth((req: NextRequest) => {
}
if (req.auth.user?.role === 'USER') {
if (!req.auth.user?.completedProfile && !req.nextUrl.pathname.startsWith('/signup')) {
const signupUrl = process.env.STUDENT_PROFILE_URL ?? 'http://localhost:3000/signup';
return NextResponse.redirect(new URL(signupUrl, req.url));
}
return NextResponse.next();
}