Skip to content

Commit

Permalink
Refactor: 로컬스토리지 삭제 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jseo9732 committed Jan 11, 2024
1 parent b71c8dc commit 9023f4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/authClient.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getItem, setItem } from '@utils/localStorageFun';
import { getItem, removeItem, setItem } from '@utils/localStorageFun';
import axios from 'axios';
import { postLogout } from './auth';

Expand Down Expand Up @@ -49,6 +49,7 @@ authClient.interceptors.response.use(
// TODO 서지수 | 로그아웃 요청
console.log('401에러 발생 로그인 페이지로 이동시키면 됩니다.');
postLogout();
removeItem('accessToken');
}
return Promise.reject(error);
},
Expand Down

0 comments on commit 9023f4f

Please sign in to comment.