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.
@@ -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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adapt-authoring-api",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Abstract module for creating APIs",
5
5
  "homepage": "https://github.com/adapt-security/adapt-authoring-api",
6
6
  "license": "GPL-3.0",