diff --git a/src/components/utlis/apiHelper.ts b/src/components/utlis/apiHelper.ts index 5ee8273e..ce99de11 100644 --- a/src/components/utlis/apiHelper.ts +++ b/src/components/utlis/apiHelper.ts @@ -170,7 +170,7 @@ API_URLS[ApiKeys.DUE_AMOUNT_SUMMARY] = '/collection-cases/{loanAccountNumber}/am API_URLS[ApiKeys.FEE_WAIVER_HISTORY] = '/collection-cases/{loanAccountNumber}/waiver-history'; API_URLS[ApiKeys.FEE_WAIVER_V2] = '/loan/request/{loanAccountNumber}/adjust-component/v2'; API_URLS[ApiKeys.GET_PIN_CODES_DETAILS] = '/api/v1/pincodes/{pinCode}'; -API_URLS[ApiKeys.SYNC_COSMOS_TO_LONGHORN] = '/agent/cosmos-sync'; +API_URLS[ApiKeys.SYNC_COSMOS_TO_LONGHORN] = '/sync/tele-cosmos-sync'; API_URLS[ApiKeys.CALL_CUSTOMER] = '/call-recording/call-request/{loanAccountNumber}/{telephoneReferenceId}'; API_URLS[ApiKeys.SYNC_ACTIVE_CALL_DETAILS] = '/call-recording/call-status'; API_URLS[ApiKeys.GET_CALL_HISTORY] = '/call-recording/call-history/{loanAccountNumber}'; @@ -345,7 +345,6 @@ axiosInstance.interceptors.response.use( axiosInstance.defaults.headers.common['Content-Type'] = 'application/json'; axiosInstance.defaults.baseURL = BASE_AV_APP_URL; -axiosInstance.defaults.headers.common['routing_key'] = 'a833bdaf-3504-4639-b202-461e28f6a4b6'; // TODO:: Ideally should happen through middlewares. export const registerNavigateAndDispatch = (dispatchParam: Dispatch) => diff --git a/src/miniModules/callingAgents/screens/homeScreen/action.ts b/src/miniModules/callingAgents/screens/homeScreen/action.ts index 35e26dae..dae4cfbe 100644 --- a/src/miniModules/callingAgents/screens/homeScreen/action.ts +++ b/src/miniModules/callingAgents/screens/homeScreen/action.ts @@ -4,7 +4,8 @@ import { toast } from "@rn-ui-lib/components/toast"; export const syncToLonghorn = async ( allPermissionsGranted: boolean, agentId: string, - appVersion: string + appVersion: string, + showSyncToast ?: boolean ) => { const url = getApiUrl(ApiKeys.SYNC_COSMOS_TO_LONGHORN); const payload = { @@ -13,8 +14,8 @@ export const syncToLonghorn = async ( appVersion, }; try { - await axiosInstance.post(url, payload); + await axiosInstance.post(url, payload , { headers: { donotHandleError: true } }); } catch { - toast({ type: 'error', text1: 'Could not sync. Please try again' }); + showSyncToast && toast({ type: 'error', text1: 'Could not sync. Please try again' }); } -} +} \ No newline at end of file diff --git a/src/miniModules/callingAgents/screens/homeScreen/index.tsx b/src/miniModules/callingAgents/screens/homeScreen/index.tsx index 902373cc..bea3d260 100644 --- a/src/miniModules/callingAgents/screens/homeScreen/index.tsx +++ b/src/miniModules/callingAgents/screens/homeScreen/index.tsx @@ -25,7 +25,7 @@ const CallingAgentHomeScreen = () => { const appVersion = getAppVersion(); const handleOnPress = async () => { const allPermissionsGranted = await checkPermissions(); - await syncToLonghorn(allPermissionsGranted, agentId, appVersion); + await syncToLonghorn(allPermissionsGranted, agentId, appVersion, true); }; return (