Skip to content

Commit

Permalink
finally working (this time seriously)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikołaj Burdzy committed May 8, 2024
1 parent c733b23 commit f5e25f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/services/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ export const Api = axios.create({

})
Api.interceptors.request.use(function (config) {
const token = store.getState().user.token;
config.headers.Authorization = 'Bearer '+token;

try{
const token = store.getState().user.token;
config.headers.Authorization = 'Bearer ' + token;
}catch(e){}
return config;
});
// await Api.get('GameType/getAll')
Expand Down

0 comments on commit f5e25f9

Please sign in to comment.