diff --git a/.env.production b/.env.production index d9eb6ce..ed3ca4d 100644 --- a/.env.production +++ b/.env.production @@ -1,2 +1,2 @@ # Ici, on force React à tirer sur le bon domaine une fois en ligne ! -VITE_API_BASE_URL=https://web.gise.be \ No newline at end of file +VITE_API_BASE_URL=https://web.gise.be/index.php?_url= \ No newline at end of file diff --git a/src/services/api.js b/src/services/api.js index d474717..8f868f4 100644 --- a/src/services/api.js +++ b/src/services/api.js @@ -29,18 +29,18 @@ const apiCall = async (url, body = null) => { // ========================================== export const loginClient = (email, password) => - apiCall(`${BASE_URL}/index.php?_url=/api/guest/client/login`, { email, password }); + apiCall(`${BASE_URL}/api/guest/client/login`, { email, password }); export const getClientProfile = () => - apiCall(`${BASE_URL}/index.php?_url=/api/client/profile/get`); + apiCall(`${BASE_URL}/api/client/profile/get`); // Récupère la liste des services/commandes du client export const getClientOrders = () => - apiCall(`${BASE_URL}/index.php?_url=/api/client/order/get_list`); + apiCall(`${BASE_URL}/api/client/order/get_list`); // Récupère les détails techniques du service rattaché à une commande export const getOrderService = (order_id) => - apiCall(`${BASE_URL}/index.php?_url=/api/client/order/service`, { id: order_id }); + apiCall(`${BASE_URL}/api/client/order/service`, { id: order_id }); // ========================================== // ROUTES PERSONNALISÉES (CUSTOM API)