From a0032b26c18b5a3848777e861947c85bc36c95fc Mon Sep 17 00:00:00 2001 From: Alexandro Uc Santos Date: Mon, 17 Jun 2024 20:05:04 -0600 Subject: [PATCH] fix: msg role invalid --- src/services/auth.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/services/auth.js b/src/services/auth.js index 3071b39..f7d2844 100644 --- a/src/services/auth.js +++ b/src/services/auth.js @@ -6,7 +6,7 @@ export const login = async(body) => { try { const endpoint = "/v1/account/authorize"; const {data} = await apiPublic.post(endpoint, body); - console.log('auth: ', data); + // console.log('auth: ', data); if(data.accessToken !== null){ if(data.user.job_role !== 'driver'){ return { @@ -15,7 +15,10 @@ export const login = async(body) => { }; } else { //Remover datos de sesion - return 'Rol no autorizado'; + return { + msg: 'Rol no autorizado', + data: null + }; } } else { return {