From 7e6143cac738f59523755f098d2d8d7927faa4d9 Mon Sep 17 00:00:00 2001 From: Mouriya Date: Thu, 8 Aug 2024 15:48:33 +0900 Subject: [PATCH] =?UTF-8?q?axios=E3=81=A7=E3=83=88=E3=83=BC=E3=82=AF?= =?UTF-8?q?=E3=83=B3=E5=8F=96=E5=BE=97=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/boot/axios.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/boot/axios.ts b/frontend/src/boot/axios.ts index f76cdbc..4cdfc56 100644 --- a/frontend/src/boot/axios.ts +++ b/frontend/src/boot/axios.ts @@ -16,7 +16,7 @@ declare module '@vue/runtime-core' { // "export default () => {}" function below (which runs individually // for each client) const api:AxiosInstance = axios.create({ baseURL: process.env.KAB_BACKEND_URL }); -const token=JSON.parse(localStorage.getItem('auth') ?? '{}')?.token||''; +const token=JSON.parse(localStorage.getItem('auth') ?? '{}')?.token ?? ''; if(token!==''){ api.defaults.headers["Authorization"]='Bearer ' + token; }