Skip to content

Commit

Permalink
Feat: token이 없을 경우 login 페이지로 이동하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
YuuRiLee committed Sep 4, 2021
1 parent fcb2f8a commit 980d5cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ const requestApi = async ({
const currentAccessToken = getAccessToken();

if (currentAccessToken == null) {
const loginUrl = constructURL('/login');

window.location.href = loginUrl.toString();

notFoundExpected('access token');
}

Expand Down

0 comments on commit 980d5cd

Please sign in to comment.