@dhyasama/totem-models 5.6.1 → 5.7.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/Message.js +20 -0
  2. package/package.json +1 -1
package/lib/Message.js CHANGED
@@ -270,6 +270,26 @@ module.exports = function(mongoose, config) {
270
270
  subtype: 'deals',
271
271
  organization: { $exists: false }
272
272
  });
273
+ query.populate({
274
+ path: 'documents',
275
+ match: { customer: customerId }
276
+ });
277
+ query.exec(cb);
278
+
279
+ };
280
+
281
+ Message.statics.getUnprocessedPortfolio = function getUnprocessedPortfolio(customerId, cb) {
282
+
283
+ var self = this;
284
+ var query = self.find({
285
+ customer: customerId,
286
+ subtype: 'portfolio',
287
+ organization: { $exists: false }
288
+ });
289
+ query.populate({
290
+ path: 'documents',
291
+ match: { customer: customerId }
292
+ });
273
293
  query.exec(cb);
274
294
 
275
295
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "5.6.1",
3
+ "version": "5.7.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",