node-simple-collectionmodel
Advanced tools
Comparing version 1.3.43 to 1.3.44
@@ -612,2 +612,19 @@ 'use strict'; | ||
async setSequence(sequence) { | ||
return new Promise((resolve, reject) => { | ||
this.ModelSequence.findOne({ name: this.modelName }, (err, document) => { | ||
if (err) { | ||
return reject(err); | ||
} | ||
if (!document) { | ||
return reject(new Error(`Updated failed; sequence document ${this.modelName} not found`)); | ||
} | ||
document.set({ | ||
seq: sequence, | ||
}); | ||
return resolve(document.save()); | ||
}); | ||
}); | ||
} | ||
async setSequenceExtended(extraName, sequence) { | ||
@@ -614,0 +631,0 @@ if (!extraName) { |
{ | ||
"name": "node-simple-collectionmodel", | ||
"description": "A simpel and nice collection model for mongoose stuff.", | ||
"version": "1.3.43", | ||
"version": "1.3.44", | ||
"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
39585
774