cmbf-hapi-restmodel
Advanced tools
Comparing version 0.6.11 to 0.6.12
@@ -14,4 +14,10 @@ var Joi = require('joi'), | ||
*/ | ||
var _parseFilter = P.method(function(model, filter) { | ||
return filter; | ||
var _parseFilter = P.method(function(model, options) { | ||
if(options.filter) { | ||
return options.filter; | ||
} | ||
else if(options.params && options.params.filter) { | ||
return options.params.filter; | ||
} | ||
}); | ||
@@ -89,3 +95,2 @@ | ||
static list(options) { | ||
var _this = this; | ||
log.debug("list %s", this.constructor.name); | ||
@@ -95,3 +100,3 @@ options = options || {}; | ||
return _parseFilter(this, options.filter).then(this.callStaticHandler('pre-list', options)).then((query) => { | ||
return _parseFilter(this, options).then(this.callStaticHandler('pre-list', options)).then((query) => { | ||
@@ -98,0 +103,0 @@ return coll.find(query).toArray().then((results) => { |
{ | ||
"name": "cmbf-hapi-restmodel", | ||
"version": "0.6.11", | ||
"version": "0.6.12", | ||
"author": "Joel Grenon <joelgrenon@covistra.com>", | ||
@@ -5,0 +5,0 @@ "description": "Hapi plugin building a REST Api from Joi schema, backed by covistra-mongo plugin", |
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
42070
677