fix: update application title to 'Workshop Manager' and enhance authorization checks for new motivators route
This commit is contained in:
@@ -8,7 +8,10 @@ export const authConfig: NextAuthConfig = {
|
||||
authorized({ auth, request: { nextUrl } }) {
|
||||
const isLoggedIn = !!auth?.user;
|
||||
const isOnProtectedPage =
|
||||
nextUrl.pathname.startsWith('/sessions') || nextUrl.pathname.startsWith('/api/sessions');
|
||||
nextUrl.pathname.startsWith('/sessions') ||
|
||||
nextUrl.pathname.startsWith('/api/sessions') ||
|
||||
nextUrl.pathname.startsWith('/motivators') ||
|
||||
nextUrl.pathname.startsWith('/api/motivators');
|
||||
const isOnAuthPage =
|
||||
nextUrl.pathname.startsWith('/login') || nextUrl.pathname.startsWith('/register');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user