@dhyasama/totem-models 1.20.0 → 1.20.2

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.
@@ -444,6 +444,28 @@ module.exports = function(mongoose, config) {
444
444
 
445
445
  };
446
446
 
447
+ LimitedPartner.statics.getFlags = function getFlags(lpid, cb) {
448
+
449
+ var self = this;
450
+ var query = self.findById(lpid)
451
+
452
+ query.select('flags')
453
+ query.populate({
454
+ path: 'flags',
455
+ match: { customer: config.CUSTOMER_ID }
456
+ })
457
+ query.deepPopulate([
458
+ 'flags.createdBy',
459
+ ], {
460
+ populate: {
461
+ 'flags.createdBy': { select: 'name avatarUrl title' }
462
+ }
463
+ })
464
+ query.sort({'createdOn':-1})
465
+ query.exec(cb);
466
+
467
+ };
468
+
447
469
  LimitedPartner.statics.getNotes = function getNotes(lpid, cb) {
448
470
 
449
471
  var self = this;
package/lib/List.js CHANGED
@@ -118,7 +118,7 @@ module.exports = function(mongoose, config) {
118
118
  .populate('createdBy', 'name avatarUrl')
119
119
  .populate('limitedPartners', 'name logoUrl')
120
120
  .populate('organizations', 'name logoUrl')
121
- .populate('people', 'name title avatarUrl')
121
+ .populate('people', 'name title avatarUrl contact')
122
122
  .exec(cb);
123
123
  };
124
124
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "1.20.0",
3
+ "version": "1.20.2",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",
package/.npmignore DELETED
@@ -1,14 +0,0 @@
1
- lib-cov
2
- *.seed
3
- *.log
4
- *.csv
5
- *.dat
6
- *.out
7
- *.pid
8
- *.gz
9
-
10
- npm-debug.log
11
- node_modules
12
-
13
- .DS_Store
14
- .idea