@dhyasama/totem-models 8.90.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.
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
@@ -272,7 +272,7 @@ module.exports = function(mongoose, config) {
272
272
  active: { type: Boolean, default: false }
273
273
  },
274
274
 
275
- messages: [{
275
+ emails: [{
276
276
  _id: false,
277
277
  subject: { type: String, trim: true },
278
278
  body: { type: String, trim: true }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.90.0",
3
+ "version": "8.92.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",