Skip to content

Commit 473b36e

Browse files
Merge pull request #44 from 9git9git/hotfix
[HOTFIX] middleware에 BASEPATH 추가
2 parents 0097661 + 86b2542 commit 473b36e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

actions/user.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
'use server';
22

33
import { cookies } from 'next/headers';
4-
import { redirect } from 'next/navigation';
54

65
export async function getUser() {
76
try {
87
const cookieStore = await cookies();
98
const token = cookieStore.get('session_token');
109

1110
if (!token?.value) {
12-
redirect('/login');
11+
return null;
1312
}
1413

1514
const result = await fetch(

constants/routes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const ROUTES = {
1111
};
1212

1313
export const PROTECTED_ROUTES = [
14+
BASE_PATH,
1415
ROUTES.HOME,
1516
ROUTES.SCHEDULE,
1617
ROUTES.CHATBOT,

0 commit comments

Comments
 (0)