added in pagination for search result requests

This commit is contained in:
2021-10-19 16:27:24 +01:00
parent 624a6cc9a9
commit 081321452f
21 changed files with 1162 additions and 356 deletions
+9 -8
View File
@@ -62,7 +62,8 @@ export default async function ApiProxy(req, res) {
"OData-MaxVersion": "4.0",
"OData-Version": "4.0",
"Accept": "application/json",
"Prefer": 'odata.include-annotations="*",return=representation',
"Prefer":
'odata.include-annotations="*",return=representation,odata.maxpagesize=10',
"Authorization": SASToken,
"Content-Type": "application/json",
},
@@ -99,13 +100,13 @@ export default async function ApiProxy(req, res) {
return new Promise((resolve, reject) => {
let apiPath = req.url.split("/api/proxy/")[1];
let hasDocument = apiPath.indexOf("/download") > 0 ? true : false;
console.log(
"//////////////",
req.url.split("/api/proxy/")[1],
PROXY_RELAY_URL + req.query.route[0],
req.method,
hasDocument
);
// console.log(
// "//////////////",
// req.url.split("/api/proxy/")[1],
// PROXY_RELAY_URL + req.query.route[0],
// req.method,
// hasDocument
// );
axios(
req.method == "GET"
? hasDocument