adapt-authoring-api 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AbstractApiModule.js +2 -2
- package/package.json +1 -1
package/lib/AbstractApiModule.js
CHANGED
|
@@ -497,8 +497,8 @@ class AbstractApiModule extends AbstractModule {
|
|
|
497
497
|
* @param {Object} mongoOpts The MongoDB options
|
|
498
498
|
*/
|
|
499
499
|
async setUpPagination (req, res, mongoOpts) {
|
|
500
|
-
const maxPageSize = this.app.config.get('adapt-authoring-api.maxPageSize')
|
|
501
|
-
let pageSize = mongoOpts.limit ?? this.app.config.get('adapt-authoring-api.defaultPageSize')
|
|
500
|
+
const maxPageSize = this.getConfig('maxPageSize') ?? this.app.config.get('adapt-authoring-api.maxPageSize')
|
|
501
|
+
let pageSize = mongoOpts.limit ?? this.getConfig('defaultPageSize') ?? this.app.config.get('adapt-authoring-api.defaultPageSize')
|
|
502
502
|
|
|
503
503
|
if (pageSize > maxPageSize) pageSize = maxPageSize
|
|
504
504
|
|