Skip to content

Commit

Permalink
♻️ refactor : Modify URLs due to folder structure changes
Browse files Browse the repository at this point in the history
Modify URL to go to / on token expiration

Related issue: YJU-OKURA#128
  • Loading branch information
dorimu0 committed May 7, 2024
1 parent 6c78a6b commit b6bf238
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/apiUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function fetchWithInterceptors(url: string, options: RequestInit) {
response = await fetch(url, options);
} else {
console.error('トークンの有効期限が切れました。');
window.location.href = '/intro';
window.location.href = '/';
}
}

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

0 comments on commit b6bf238

Please sign in to comment.