Browse Source

Allow deep-getting of pagination params from REST responses

pull/5067/head
Andrew Kingston 4 years ago
parent
commit
8e361afcda
  1. 1
      packages/server/package.json
  2. 3
      packages/server/src/integrations/rest.ts
  3. 1079
      packages/server/yarn.lock

1
packages/server/package.json

@ -149,6 +149,7 @@
"@types/jest": "^26.0.23",
"@types/koa": "^2.13.3",
"@types/koa-router": "^7.4.2",
"@types/lodash": "4.14.180",
"@types/node": "^15.12.4",
"@types/oracledb": "^5.2.1",
"@types/redis": "^4.0.11",

3
packages/server/src/integrations/rest.ts

@ -11,6 +11,7 @@ import {
PaginationValues,
} from "../definitions/datasource"
import { IntegrationBase } from "./base/IntegrationBase"
import { get } from "lodash"
const BodyTypes = {
NONE: "none",
@ -163,7 +164,7 @@ module RestModule {
// Check if a pagination cursor exists in the response
let nextCursor = null
if (pagination?.responseParam) {
nextCursor = data?.[pagination.responseParam]
nextCursor = get(data, pagination.responseParam)
}
return {

1079
packages/server/yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save