test(actions): phase 6 add parity and behavioural service hardening checks
This commit is contained in:
@@ -1,53 +1,27 @@
|
||||
import axios from "axios";
|
||||
import { BASE_URL } from "../core/env";
|
||||
import { consoleLogger } from "../core/logger";
|
||||
import { logAndReturnEmptyValueErrorResponse } from "./httpServiceUtils";
|
||||
|
||||
export const getAppealsTypes = () => {
|
||||
return axios
|
||||
.get(BASE_URL + "/api/endpoint/getappealtypes_api")
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
let ErrResponse = {
|
||||
value: [],
|
||||
errorCode: error.response.status,
|
||||
errorMsg: error.response.statusText
|
||||
};
|
||||
|
||||
return ErrResponse;
|
||||
});
|
||||
.catch(logAndReturnEmptyValueErrorResponse);
|
||||
};
|
||||
|
||||
export const getProjectTypes = () => {
|
||||
return axios
|
||||
.get(BASE_URL + "/api/endpoint/getprojecttypes_api")
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
let ErrResponse = {
|
||||
value: [],
|
||||
errorCode: error.response.status,
|
||||
errorMsg: error.response.statusText
|
||||
};
|
||||
|
||||
return ErrResponse;
|
||||
});
|
||||
.catch(logAndReturnEmptyValueErrorResponse);
|
||||
};
|
||||
|
||||
export const getAppealsTypesForNewAppeal = () => {
|
||||
return axios
|
||||
.get(BASE_URL + "/api/endpoint/getappealtypesfornewappeal_api")
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
let ErrResponse = {
|
||||
value: [],
|
||||
errorCode: error.response.status,
|
||||
errorMsg: error.response.statusText
|
||||
};
|
||||
|
||||
return ErrResponse;
|
||||
});
|
||||
.catch(logAndReturnEmptyValueErrorResponse);
|
||||
};
|
||||
|
||||
export const getLPA = () => {
|
||||
@@ -56,16 +30,7 @@ export const getLPA = () => {
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
let ErrResponse = {
|
||||
value: [],
|
||||
errorCode: error.response.status,
|
||||
errorMsg: error.response.statusText
|
||||
};
|
||||
|
||||
return ErrResponse;
|
||||
});
|
||||
.catch(logAndReturnEmptyValueErrorResponse);
|
||||
};
|
||||
|
||||
export const getFormData = (whichForm) => {
|
||||
|
||||
Reference in New Issue
Block a user