refactor(actions): complete case read migration to endpoint client

This commit is contained in:
2026-03-25 07:52:51 +00:00
parent 353378ee45
commit ad3b18ac27
2 changed files with 51 additions and 31 deletions
+18 -31
View File
@@ -235,27 +235,19 @@ export const patchCase = async (incidentid) => {
};
export const getCase = (incidentID) => {
return axios
.get(BASE_URL + "/api/endpoint/getcase_api?incidentID=" + incidentID)
.then((res) => {
return res.data;
})
.catch((error) => {
consoleLogger(error);
});
return getJson(
BASE_URL + "/api/endpoint/getcase_api?incidentID=" + incidentID
).catch((error) => {
consoleLogger(error);
});
};
export const getCaseByID = (incidentID) => {
return axios
.get(
BASE_URL + "/api/endpoint/getcasebyid_api?incidentID=" + incidentID
)
.then((res) => {
return res.data;
})
.catch((error) => {
consoleLogger(error);
});
return getJson(
BASE_URL + "/api/endpoint/getcasebyid_api?incidentID=" + incidentID
).catch((error) => {
consoleLogger(error);
});
};
export const getAppealPDFDocs = (incidentID) => {
@@ -269,19 +261,14 @@ export const getAppealPDFDocs = (incidentID) => {
};
export const getAppealPDFDocument = async (incidentid) => {
return axios
.get(
BASE_URL +
"/api/endpoint/getappealpdfdocuments_api?incidentid=" +
incidentid
)
.then((res) => {
return res.data;
})
.catch((error) => {
consoleLogger(error);
return error.response;
});
return getJson(
BASE_URL +
"/api/endpoint/getappealpdfdocuments_api?incidentid=" +
incidentid
).catch((error) => {
consoleLogger(error);
return error.response;
});
};
export const getPortalModuleDetails = async (appealType, caseReference) => {