diff --git a/pmp-reactjs-ui/src/pages/admin/policyManager/PolicyGroupList.js b/pmp-reactjs-ui/src/pages/admin/policyManager/PolicyGroupList.js index 5697638e..6bf9bdde 100644 --- a/pmp-reactjs-ui/src/pages/admin/policyManager/PolicyGroupList.js +++ b/pmp-reactjs-ui/src/pages/admin/policyManager/PolicyGroupList.js @@ -60,7 +60,7 @@ function PolicyGroupList() { useEffect(() => { const fetchData = async () => { - //reset page number to 0 if filter applied or page number is out of bounds + // reset page number to 0 if filter applied or page number is out of bounds const totalNumberOfPages = Math.ceil(totalRecords / pageSize); const effectivePageNo = pageNo > totalNumberOfPages || resetPageNo ? 0 : pageNo; setResetPageNo(false); @@ -75,7 +75,12 @@ function PolicyGroupList() { }); try { triggerServerMethod ? setTableDataLoaded(false) : setDataLoaded(false); - const response = await HttpService.post(getPolicyManagerUrl(`/policies/group/search`, process.env.NODE_ENV), request); + const response = await HttpService({ + url: getPolicyManagerUrl('/policies/group/search', process.env.NODE_ENV), + method: 'post', + baseURL: process.env.NODE_ENV !== 'production' ? '' : window._env_.REACT_APP_POLICY_MANAGER_API_BASE_URL, + data: request + }); if (response) { const responseData = response.data; if (responseData && responseData.response) { @@ -310,4 +315,4 @@ function PolicyGroupList() { ) } -export default PolicyGroupList; \ No newline at end of file +export default PolicyGroupList;