Skip to content

Commit b6bf238

Browse files
committed
♻️ refactor : Modify URLs due to folder structure changes
Modify URL to go to / on token expiration Related issue: YJU-OKURA#128
1 parent 6c78a6b commit b6bf238

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/apiUtils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async function fetchWithInterceptors(url: string, options: RequestInit) {
3838
response = await fetch(url, options);
3939
} else {
4040
console.error('トークンの有効期限が切れました。');
41-
window.location.href = '/intro';
41+
window.location.href = '/';
4242
}
4343
}
4444

@@ -53,7 +53,7 @@ const req = async (
5353
url: string,
5454
method: RequestInit['method'],
5555
server: 'gin' | 'nest',
56-
body: BodyInit | null | undefined = undefined
56+
body: BodyInit | object | undefined = undefined
5757
) => {
5858
const headers = new Headers();
5959
const token = localStorage.getItem('access_token');

0 commit comments

Comments
 (0)