This commit is contained in:
coma 2025-09-25 01:54:30 +04:00
commit 5ab2d8abfd
45 changed files with 9738 additions and 0 deletions

20
src/lib/services/api.js Normal file
View file

@ -0,0 +1,20 @@
import axios from "axios";
const API_BASE_URL = 'http://localhost:3000/api';
const apiClient = axios.create({
baseURL: API_BASE_URL,
timeout: 10000,
headers: {
'Content-Type': 'application/json',
}
});
apiClient.interceptors.response.use(
(response) => response,
(error) => {
console.error('API Error:', error);
throw error;
}
);
export default apiClient;