From c3c8639ce02e3c1e540db023356d56d9781230e7 Mon Sep 17 00:00:00 2001 From: SNUPI Date: Thu, 29 Sep 2022 17:03:58 +0900 Subject: [PATCH] =?UTF-8?q?[=20hotfix=20]=20=ED=9A=8C=EC=9B=90,=20?= =?UTF-8?q?=EB=B9=84=ED=9A=8C=EC=9B=90=20=EA=B5=AC=EB=B6=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/api/common/axios.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/api/common/axios.ts b/src/core/api/common/axios.ts index 0e0f63d2..59c72ce7 100644 --- a/src/core/api/common/axios.ts +++ b/src/core/api/common/axios.ts @@ -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 }; });