auth stuff
This commit is contained in:
@@ -17,7 +17,8 @@ const apiClient = axios.create({
|
||||
apiClient.interceptors.request.use(
|
||||
(config) => {
|
||||
const token = localStorage.getItem('authToken');
|
||||
if (token) {
|
||||
console.log('Token from localStorage:', token);
|
||||
if (token && token !== 'undefined' && token !== 'null') {
|
||||
config.headers.Authorization = `Bearer ${token}`;
|
||||
}
|
||||
return config;
|
||||
|
||||
Reference in New Issue
Block a user