klark-js-plugins
Advanced tools
Comparing version 1.0.27 to 1.0.28
{ | ||
"name": "klark-js-plugins", | ||
"version": "1.0.27", | ||
"version": "1.0.28", | ||
"description": "Plugin modules for KlarkJS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -46,7 +46,9 @@ 'use strict'; | ||
return function(req, res, next) { | ||
var findOpts = { | ||
pagination: res.locals.params.pagination, | ||
var filterOpts = { | ||
filters: res.locals.params.filters, | ||
uniqueBy: res.locals.params.uniqueBy | ||
}; | ||
var findOpts = _.assignIn({ | ||
pagination: res.locals.params.pagination, | ||
}, filterOpts); | ||
@@ -56,3 +58,3 @@ q.all([ | ||
krkDbMongooseBinders.count(model), | ||
(findOpts.filters || findOpts.uniqueBy) && krkDbMongooseBinders.find(model, findOpts).count() | ||
(filterOpts.filters || filterOpts.uniqueBy) && krkDbMongooseBinders.find(model, filterOpts).count() | ||
]) | ||
@@ -59,0 +61,0 @@ .then(function(resolvedPromises) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80225
2024