Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/AbstractApiModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ class AbstractApiModule extends AbstractModule {
}

/**
* Validates and sets the relevant pagination options (limit, skip) and HTTP headers (X-Adapt-Page, X-Adapt-PageTotal, Link).
* Validates and sets the relevant pagination options (limit, skip) and HTTP headers (X-Adapt-Page, X-Adapt-PageTotal, X-Adapt-Total, Link).
* @param {external:ExpressRequest} req
* @param {external:ExpressResponse} res
* @param {Object} mongoOpts The MongoDB options
Expand All @@ -568,6 +568,7 @@ class AbstractApiModule extends AbstractModule {
res.set('X-Adapt-Page', page)
res.set('X-Adapt-PageSize', pageSize)
res.set('X-Adapt-PageTotal', pageTotal)
res.set('X-Adapt-Total', docCount)

if (pageTotal > 1) {
// absolute URL with paging params removed
Expand Down
Loading