klark-js-plugins
Advanced tools
Comparing version 1.0.23 to 1.0.24
{ | ||
"name": "klark-js-plugins", | ||
"version": "1.0.23", | ||
"version": "1.0.24", | ||
"description": "Plugin modules for KlarkJS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,2 +8,3 @@ 'use strict'; | ||
findByIdAndUpdate: findByIdAndUpdate, | ||
findOneAndUpdate: findOneAndUpdate, | ||
findById: findById, | ||
@@ -27,2 +28,6 @@ find: find, | ||
function findOneAndUpdate(model, q, record) { | ||
return model.findOneAndUpdate(q, record, {new: true}); | ||
} | ||
function findById(model, id) { | ||
@@ -29,0 +34,0 @@ // mongoose autopopulate is not working for findById |
@@ -28,3 +28,3 @@ 'use strict'; | ||
decorateMongoosePromises(); | ||
$mongoose.connect(mongodbUrl); | ||
$mongoose.connect(mongodbUrl, { useMongoClient: true }); | ||
var db = $mongoose.connection; | ||
@@ -31,0 +31,0 @@ db.on('error', function(err) { |
@@ -25,3 +25,3 @@ 'use strict'; | ||
let msg; | ||
if (options.showStackError === 'dev') { | ||
if (options.showStackError) { | ||
msg = { | ||
@@ -28,0 +28,0 @@ msg: err.message, |
77825
1923