refactor: remove /ee/ url segment from atoms hooks (#14602)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user