added fixes to reduce error when calling module details and filtering of docs
This commit is contained in:
@@ -25,9 +25,17 @@ export default async function ApiProxy(req, res) {
|
||||
var token = await getToken();
|
||||
|
||||
var queryUrl =
|
||||
"incidents?$select=_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,statuscode,ticketnumber,title &$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
|
||||
"incidents?$select=pinswg_appealcasetype,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,statuscode,ticketnumber,title &$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
|
||||
|
||||
//console.log(queryUrl);
|
||||
console.log(queryUrl);
|
||||
|
||||
function renameJsonKey(jsonObj, oldKey, newKey) {
|
||||
if (jsonObj.hasOwnProperty(oldKey)) {
|
||||
jsonObj[newKey] = jsonObj[oldKey]; // Add new key with the same value
|
||||
delete jsonObj[oldKey]; // Delete old key
|
||||
}
|
||||
return jsonObj;
|
||||
}
|
||||
|
||||
return axios
|
||||
.get(
|
||||
@@ -36,6 +44,7 @@ export default async function ApiProxy(req, res) {
|
||||
)
|
||||
.then(({ data }) => {
|
||||
var dataStr;
|
||||
|
||||
_.has(data, "@odata.nextLink") == true &&
|
||||
((dataStr = JSON.stringify(data["@odata.nextLink"])),
|
||||
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
|
||||
|
||||
Reference in New Issue
Block a user