cmbf-hapi-restmodel
Advanced tools
Comparing version 0.6.5 to 0.6.6
@@ -216,3 +216,3 @@ var Joi = require('joi'), | ||
var service = _this.constructor.handlers[key]; | ||
if(service) { | ||
if(_.isObject(service)) { | ||
service.model = _this; | ||
@@ -224,2 +224,10 @@ service.Model = _this.constructor; | ||
} | ||
else if(_.isFunction(service)) { | ||
return service({ | ||
model: _this, | ||
Model: _this.constructor, | ||
data: result, | ||
credentials: options.credentials | ||
}); | ||
} | ||
else { | ||
@@ -226,0 +234,0 @@ return result |
{ | ||
"name": "cmbf-hapi-restmodel", | ||
"version": "0.6.5", | ||
"version": "0.6.6", | ||
"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
40380
645