pagination on dns results fix

This commit is contained in:
2022-02-09 13:49:56 +00:00
parent d1d86742ef
commit 42c0934c2c
5 changed files with 55 additions and 38 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;
@@ -27,6 +27,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=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=" +
@@ -41,7 +42,7 @@ export default async function ApiProxy(req, res) {
return axios
.get(
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
azureHeadersPaged(token.access_token)
azureHeadersPagedCustom(token.access_token, showNumberOfRecords)
)
.then(({ data }) => {
var dataStr;
-1
View File
@@ -32,7 +32,6 @@ export default async function ApiProxy(req, res) {
azureHeaders(token.access_token)
)
.then(({ data }) => {
console.log(data);
res.status(200).json(data);
})
.catch(({ err }) => {