node-simple-collectionmodel
Advanced tools
Comparing version 1.3.13 to 1.3.14
@@ -326,2 +326,7 @@ 'use strict'; | ||
const dataObject = { ...$dataObject }; | ||
let debug; | ||
if ($opts.debug) { | ||
debug = $opts.debug; | ||
delete $opts.debug; | ||
} | ||
// If dataObject is still empty, bail out | ||
@@ -352,8 +357,11 @@ if (typeof dataObject === 'undefined') { | ||
}; | ||
// console.log('collectionModel.dataObject:', dataObject); | ||
// console.log('collectionModel.query:', query); | ||
if (debug) { | ||
console.log('collectionModel.dataObject:', dataObject); | ||
console.log('collectionModel.query:', query); | ||
} | ||
this.Model.findOneAndUpdate(query, dataObject, opts, (err, document) => { | ||
// console.log('collectionModel.findOneAndUpdate.err:', err); | ||
// console.log('collectionModel.findOneAndUpdate.document:', document); | ||
if (debug) { | ||
console.log('collectionModel.findOneAndUpdate.err:', err); | ||
console.log('collectionModel.findOneAndUpdate.document:', document); | ||
} | ||
if (err) { | ||
@@ -360,0 +368,0 @@ return reject(err); |
{ | ||
"name": "node-simple-collectionmodel", | ||
"description": "A simpel and nice collection model for mongoose stuff.", | ||
"version": "1.3.13", | ||
"version": "1.3.14", | ||
"homepage": "https://github.com/5orenso/node-simple-collectionmodel", | ||
@@ -6,0 +6,0 @@ "repository": { |
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
32073
570