Fix jwt-token
This commit is contained in:
@@ -33,6 +33,9 @@ api.interceptors.request.use(
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
config.headers.Authorization = `Bearer ${token}`;
|
||||
console.log('🔑 API Request: Token added to', config.url, 'Token length:', token.length);
|
||||
} else {
|
||||
console.warn('⚠️ API Request: No token found for', config.url);
|
||||
}
|
||||
return config;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user