Sets us up for pagination to list endpoints like /_components/instances
Calls db.createReadStream() which has been modified in the storage module, for list requests
Adds prev and size query params to list requests
Checks whether prev matches up with where it's being requested, ie. a request to nymag.com/_components/ad/instances should be for something likenymag.com/_components/ad/instances/aaa, and drops prev if it's invalid, errors if it's not
Checks whether size is a number and within the configured maximum, errors if it's not a number
Sets us up for pagination to list endpoints like
/_components/instances
db.createReadStream()
which has been modified in the storage module, for list requestsprev
andsize
query params to list requestsprev
matches up with where it's being requested, ie. a request tonymag.com/_components/ad/instances
should be for something likenymag.com/_components/ad/instances/aaa
, and dropsprev
if it's invalid, errors if it's notsize
is a number and within the configured maximum, errors if it's not a numberRequires https://github.com/clay/amphora-storage-postgres/pull/64 for pagination.