refactor(actions): expand endpoint client adoption in case reads
This commit is contained in:
@@ -5,67 +5,43 @@ import { logAndReturnResponse } from "./httpServiceUtils";
|
||||
import { getJson } from "../clients/endpointClient";
|
||||
|
||||
export const getCaseMessage = (searchString) => {
|
||||
return axios
|
||||
.get(BASE_URL + "/api/endpoint/getcasemessage_api?id=" + searchString)
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
})
|
||||
.catch(logAndReturnResponse);
|
||||
return getJson(
|
||||
BASE_URL + "/api/endpoint/getcasemessage_api?id=" + searchString
|
||||
).catch(logAndReturnResponse);
|
||||
};
|
||||
|
||||
export const getIncidentbyID = (searchString) => {
|
||||
return axios
|
||||
.get(
|
||||
BASE_URL +
|
||||
"/api/endpoint/getincidentbyid_api?searchString=" +
|
||||
searchString
|
||||
)
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
})
|
||||
.catch(logAndReturnResponse);
|
||||
return getJson(
|
||||
BASE_URL +
|
||||
"/api/endpoint/getincidentbyid_api?searchString=" +
|
||||
searchString
|
||||
).catch(logAndReturnResponse);
|
||||
};
|
||||
|
||||
export const getIsPublishedbyID = (searchString) => {
|
||||
return axios
|
||||
.get(
|
||||
"/api/endpoint/getispublishedbyid_api?searchString=" + searchString
|
||||
)
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
})
|
||||
.catch(logAndReturnResponse);
|
||||
return getJson(
|
||||
"/api/endpoint/getispublishedbyid_api?searchString=" + searchString
|
||||
).catch(logAndReturnResponse);
|
||||
};
|
||||
|
||||
export const getPartSavedAppeal = (searchString) => {
|
||||
return axios
|
||||
.get(
|
||||
BASE_URL +
|
||||
"/api/endpoint/getpartsavedappeal_api?searchString=" +
|
||||
searchString
|
||||
)
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
})
|
||||
.catch(logAndReturnResponse);
|
||||
return getJson(
|
||||
BASE_URL +
|
||||
"/api/endpoint/getpartsavedappeal_api?searchString=" +
|
||||
searchString
|
||||
).catch(logAndReturnResponse);
|
||||
};
|
||||
|
||||
export const getSIPSEvents = async (caseid) => {
|
||||
return axios
|
||||
.get(BASE_URL + "/api/endpoint/getsipsevents_api?caseid=" + caseid)
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
})
|
||||
.catch(logAndReturnResponse);
|
||||
return getJson(
|
||||
BASE_URL + "/api/endpoint/getsipsevents_api?caseid=" + caseid
|
||||
).catch(logAndReturnResponse);
|
||||
};
|
||||
|
||||
export const getSIPSMedia = async (caseid) => {
|
||||
return axios
|
||||
.get(BASE_URL + "/api/endpoint/getsipsmedia_api?caseid=" + caseid)
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
})
|
||||
.catch(logAndReturnResponse);
|
||||
return getJson(
|
||||
BASE_URL + "/api/endpoint/getsipsmedia_api?caseid=" + caseid
|
||||
).catch(logAndReturnResponse);
|
||||
};
|
||||
|
||||
export const getAppealID = (
|
||||
|
||||
Reference in New Issue
Block a user