Skip to content

Commit

Permalink
[ hotfix ] 회원, 비회원 구분
Browse files Browse the repository at this point in the history
  • Loading branch information
joohaem committed Sep 29, 2022
1 parent 08f41c4 commit c3c8639
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/api/common/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ const real = axios.create({
});

real.interceptors.request.use((config) => {
if (localStorage.getItem("piickle-token") === null) return { ...config };

const headers = {
...config.headers,
"x-auth-token": `Bearer ${localStorage.getItem("piickle-token")}`,
};

return { ...config, headers };
});

Expand Down

0 comments on commit c3c8639

Please sign in to comment.