import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react';
export const apiUrl = import.meta.env.VITE_API_URL || 'http://localhost:8080';
// export const apiUrl = 'http://localhost:8080';
const baseQuery = fetchBaseQuery({
baseUrl: apiUrl,
credentials: 'include',
});
const api = createApi({
reducerPath: 'api',
baseQuery: baseQuery,
tagTypes: [
'meetings',
'users',
'courses',
'teachers',
'orders',
'enrollments',
],
endpoints: () => ({}),
});
export default api;