feat: version 2.1

This commit is contained in:
2026-02-13 00:01:00 +05:30
parent 005838045a
commit 2a46aa7d79
13 changed files with 548 additions and 63 deletions

View File

@@ -2,14 +2,7 @@ import axios from 'axios';
const api = axios.create({
baseURL: import.meta.env.VITE_BACKEND_URL || 'http://localhost:8080',
});
api.interceptors.request.use((config) => {
const token = localStorage.getItem('token');
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}
return config;
withCredentials: true, // Send cookies with requests
});
export default api;