codex changes
This commit is contained in:
@@ -26,7 +26,10 @@ const apiClient = axios.create({
|
||||
apiClient.interceptors.request.use(
|
||||
(config) => {
|
||||
const token = localStorage.getItem('authToken');
|
||||
console.log('Token from localStorage:', token);
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
// Minimal visibility during development only
|
||||
if (token) console.log('Auth token present');
|
||||
}
|
||||
if (token && token !== 'undefined' && token !== 'null') {
|
||||
config.headers.Authorization = `Bearer ${token}`;
|
||||
}
|
||||
@@ -248,4 +251,4 @@ export const formatApiResponse = (response) => {
|
||||
};
|
||||
|
||||
// Export the configured axios instance for custom requests
|
||||
export default apiClient;
|
||||
export default apiClient;
|
||||
|
||||
Reference in New Issue
Block a user