umbennen von frontend zu frontend

This commit is contained in:
Nirodan
2025-06-14 14:01:20 +02:00
parent 6530638141
commit 5424351cea
22 changed files with 50 additions and 2 deletions
+13
View File
@@ -0,0 +1,13 @@
import axios from 'axios';
const instance = axios.create({
baseURL: import.meta.env.VITE_API_URL || 'http://localhost:5000/api',
});
instance.interceptors.request.use(config => {
const token = localStorage.getItem('token');
if (token) config.headers.Authorization = `Bearer ${token}`;
return config;
});
export default instance;