login user implemented

This commit was merged in pull request #8.
This commit is contained in:
victorAnumudu
2023-04-14 19:49:59 +01:00
parent 9103a812b5
commit c17f95351f
6 changed files with 20 additions and 13 deletions
+2 -2
View File
@@ -52,8 +52,8 @@ export function setupAxios(axios: any) {
axios.interceptors.request.use(
(config: {headers: {Authorization: string}}) => {
const auth = getAuth()
if (auth && auth.api_token) {
config.headers.Authorization = `Bearer ${auth.api_token}`
if (auth && auth.session_token) {
config.headers.Authorization = `Bearer ${auth.session_token}`
}
return config