@dhyasama/totem-models 11.23.0 → 11.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Account.js +12 -0
- package/package.json +1 -1
package/lib/Account.js
CHANGED
|
@@ -242,6 +242,18 @@ module.exports = function(mongoose, config) {
|
|
|
242
242
|
|
|
243
243
|
};
|
|
244
244
|
|
|
245
|
+
Account.statics.listSummaryAccounts = function (options, cb) {
|
|
246
|
+
|
|
247
|
+
const self = this;
|
|
248
|
+
|
|
249
|
+
if (!cb) { throw new Error('cb is required'); }
|
|
250
|
+
|
|
251
|
+
self
|
|
252
|
+
.find({ 'active': true, 'summary.active': true })
|
|
253
|
+
.exec(cb);
|
|
254
|
+
|
|
255
|
+
};
|
|
256
|
+
|
|
245
257
|
Account.statics.listAllAccounts = function (options, cb) {
|
|
246
258
|
|
|
247
259
|
// This is only for worker
|