select number records returned

This commit is contained in:
2022-02-01 11:36:14 +00:00
parent a17385d037
commit c932f57bf3
16 changed files with 212 additions and 53 deletions
@@ -1,7 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken, azureHeadersPaged } from "../../../actions";
import { getToken, azureHeadersPagedCustom } from "../../../actions";
const WORDKEY = process.env.HASHKEY;
@@ -26,6 +26,7 @@ export default async function ApiProxy(req, res) {
var orderby = req.query.orderby;
var fieldSort = req.query.fieldSort;
var showNumberOfRecords = req.query.showNumberOfRecords;
var queryUrl =
"incidents?$select=description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
@@ -48,7 +49,10 @@ export default async function ApiProxy(req, res) {
? axios
.get(
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
azureHeadersPaged(token.access_token)
azureHeadersPagedCustom(
token.access_token,
showNumberOfRecords
)
)
.then(({ data }) => {
var dataStr;