From 0eae0bb8fe7887b8bdd0e309f75ff2029ec4cc9f Mon Sep 17 00:00:00 2001 From: Lauris Skraucis Date: Tue, 16 Apr 2024 12:29:12 +0200 Subject: [PATCH] refactor: remove /ee/ url segment from atoms hooks (#14602) --- packages/platform/atoms/hooks/useCancelBooking.ts | 2 +- packages/platform/atoms/hooks/useOAuthClient.ts | 2 +- packages/platform/atoms/hooks/useOAuthFlow.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/platform/atoms/hooks/useCancelBooking.ts b/packages/platform/atoms/hooks/useCancelBooking.ts index 3960b8fe40..d1502a0448 100644 --- a/packages/platform/atoms/hooks/useCancelBooking.ts +++ b/packages/platform/atoms/hooks/useCancelBooking.ts @@ -26,7 +26,7 @@ export const useCancelBooking = ( ) => { const cancelBooking = useMutation({ mutationFn: (data) => { - return http.post(`/ee/bookings/${data.id}/cancel`, data).then((res) => { + return http.post(`/bookings/${data.id}/cancel`, data).then((res) => { if (res.data.status === SUCCESS_STATUS) { return res.data; } diff --git a/packages/platform/atoms/hooks/useOAuthClient.ts b/packages/platform/atoms/hooks/useOAuthClient.ts index 786a388933..c2516dade2 100644 --- a/packages/platform/atoms/hooks/useOAuthClient.ts +++ b/packages/platform/atoms/hooks/useOAuthClient.ts @@ -31,7 +31,7 @@ export const useOAuthClient = ({ clientId, apiUrl, refreshUrl, onError, onSucces if (clientId && http.getUrl() && prevClientId !== clientId) { try { http - .get(`/ee/provider/${clientId}`) + .get(`/provider/${clientId}`) .then(() => { onSuccess(); http.setClientIdHeader(clientId); diff --git a/packages/platform/atoms/hooks/useOAuthFlow.ts b/packages/platform/atoms/hooks/useOAuthFlow.ts index 7a58db798e..d9ff7bed8b 100644 --- a/packages/platform/atoms/hooks/useOAuthFlow.ts +++ b/packages/platform/atoms/hooks/useOAuthFlow.ts @@ -58,7 +58,7 @@ export const useOAuthFlow = ({ accessToken, refreshUrl, clientId, onError, onSuc http.setAuthorizationHeader(accessToken); try { http - .get(`/ee/provider/${clientId}/access-token`) + .get(`/provider/${clientId}/access-token`) .catch(async (err: AxiosError) => { if ((err.response?.status === 498 || err.response?.status === 401) && refreshUrl) { setIsRefreshing(true);