@dhyasama/totem-models 8.91.0 → 8.92.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.
Files changed (2) hide show
  1. package/lib/Account.js +14 -0
  2. package/package.json +1 -1
package/lib/Account.js CHANGED
@@ -216,6 +216,20 @@ module.exports = function(mongoose, config) {
216
216
 
217
217
  };
218
218
 
219
+ Account.statics.getAccountsByCustomer = function (cb) {
220
+
221
+ const self = this;
222
+
223
+ if (!cb) { throw new Error('cb is required'); }
224
+
225
+ self
226
+ .find({'active': true})
227
+ .populate('person')
228
+ .populate('org')
229
+ .exec(cb);
230
+
231
+ };
232
+
219
233
  Account.statics.listAllAccounts = function (options, cb) {
220
234
 
221
235
  // This is only for worker
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.91.0",
3
+ "version": "8.92.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",