Skip to content

Commit

Permalink
doctor middleware added
Browse files Browse the repository at this point in the history
  • Loading branch information
sinanptm committed Oct 8, 2024
1 parent f571c62 commit 98a055b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions client/app/doctor/@auth/default.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Page from './page';
export default Page;
8 changes: 4 additions & 4 deletions client/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ export function middleware(request: NextRequest) {
if (pathname === '/admin') {
return NextResponse.redirect(new URL('/admin/dashboard', request.url));
}
// if(pathname==='/doctor'){
// return NextResponse.redirect(new URL("/doctor/slots"));
// }
if (pathname === '/doctor') {
return NextResponse.redirect(new URL("/doctor/slots", request.url));
}
return NextResponse.next();
}

export const config = {
matcher: ['/admin/:path*'],
matcher: ['/admin/:path*', "/doctor/:path"],
};

0 comments on commit 98a055b

Please sign in to comment.