From 82bf3f88dbd6a61f585ecbbeeef0bde4854c0485 Mon Sep 17 00:00:00 2001 From: jiyoung Date: Mon, 9 Dec 2024 17:27:38 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20role=20=EC=B6=94=EA=B0=80=20(#7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/loginApi.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/loginApi.ts b/src/api/loginApi.ts index 61e0805..e912c66 100644 --- a/src/api/loginApi.ts +++ b/src/api/loginApi.ts @@ -78,8 +78,10 @@ export const postSignIn = async (body: { email: string; password: string }) => { const token = response.headers['authorization'] || response.headers['Authorization']; + const role = response.data.roles; if (token) { localStorage.setItem('token', token); + localStorage.setItem('role', role); } return response; };