update, consume for login done

This commit is contained in:
wayanrivan
2026-07-07 11:34:38 +07:00
parent 0ec6ef1841
commit 8a7dfc2c86
8 changed files with 59 additions and 139 deletions

View File

@ -41,9 +41,9 @@ export function setupAxios(axios: any) {
(config: { headers: { Authorization: string }; params?: any; url?: any; httpsAgent: any }) => {
const auth = getAuth();
// if (auth?.access_token) {
// config.headers.Authorization = `Bearer ${auth.access_token}`;
// }
if (auth?.access_token) {
config.headers.Authorization = `Bearer ${auth.access_token}`;
}
return config;
},
async (err: any) => await Promise.reject(err)