auth stuff

This commit is contained in:
Jake Kasper
2025-08-21 12:57:23 -05:00
parent da43e32ade
commit be4951153c
3 changed files with 15 additions and 4 deletions

View File

@@ -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;