refactor: remove /ee/ url segment from atoms hooks (#14602)

This commit is contained in:
Lauris Skraucis
2024-04-16 07:29:12 -03:00
committed by GitHub
parent b61820d354
commit 0eae0bb8fe
3 changed files with 3 additions and 3 deletions
@@ -26,7 +26,7 @@ export const useCancelBooking = (
) => {
const cancelBooking = useMutation<ApiResponse, Error, inputParams>({
mutationFn: (data) => {
return http.post<ApiResponse>(`/ee/bookings/${data.id}/cancel`, data).then((res) => {
return http.post<ApiResponse>(`/bookings/${data.id}/cancel`, data).then((res) => {
if (res.data.status === SUCCESS_STATUS) {
return res.data;
}
@@ -31,7 +31,7 @@ export const useOAuthClient = ({ clientId, apiUrl, refreshUrl, onError, onSucces
if (clientId && http.getUrl() && prevClientId !== clientId) {
try {
http
.get<ApiResponse>(`/ee/provider/${clientId}`)
.get<ApiResponse>(`/provider/${clientId}`)
.then(() => {
onSuccess();
http.setClientIdHeader(clientId);
@@ -58,7 +58,7 @@ export const useOAuthFlow = ({ accessToken, refreshUrl, clientId, onError, onSuc
http.setAuthorizationHeader(accessToken);
try {
http
.get<ApiResponse>(`/ee/provider/${clientId}/access-token`)
.get<ApiResponse>(`/provider/${clientId}/access-token`)
.catch(async (err: AxiosError) => {
if ((err.response?.status === 498 || err.response?.status === 401) && refreshUrl) {
setIsRefreshing(true);