|
|
@@ -254,7 +254,7 @@ module.exports = function(crowi) {
|
|
|
userSchema.statics.findUsersWithPagination = function(options, callback) {
|
|
|
var sort = options.sort || {status: 1, username: 1, createdAt: 1};
|
|
|
|
|
|
- this.paginate({}, options.page || 1, PAGE_ITEMS, function(err, pageCount, paginatedResults, itemCount) {
|
|
|
+ this.paginate({}, { page: options.page || 1, limit: PAGE_ITEMS }, function(err, paginatedResults, pageCount, itemCount) {
|
|
|
if (err) {
|
|
|
debug('Error on pagination:', err);
|
|
|
return callback(err, null);
|