new temporal folder to test

This commit is contained in:
José Salazar
2025-12-04 18:02:28 -05:00
parent cf18fdb16b
commit 48d86436e3
252 changed files with 120330 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import axios from "axios";
import { auth } from "../firebase";
const apiClient = axios.create({
baseURL: import.meta.env.VITE_API_BASE_URL, // You will need to add this to your .env file
});
apiClient.interceptors.request.use(
async (config) => {
const user = auth.currentUser;
if (user) {
const token = await user.getIdToken();
config.headers.Authorization = `Bearer ${token}`;
}
return config;
},
(error) => {
return Promise.reject(error);
}
);
export default apiClient;