@dhyasama/totem-models 1.14.0 → 1.16.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/Organization.js +10 -0
- package/lib/Round.js +2 -0
- package/package.json +1 -1
package/lib/Organization.js
CHANGED
|
@@ -693,6 +693,16 @@ module.exports = function(mongoose, config) {
|
|
|
693
693
|
|
|
694
694
|
};
|
|
695
695
|
|
|
696
|
+
Organization.statics.getAcquistions = function getAcquistions(orgid, cb) {
|
|
697
|
+
// todo - logic to check public and private
|
|
698
|
+
var self = this;
|
|
699
|
+
self
|
|
700
|
+
.find({
|
|
701
|
+
'operating.acquired.private.by': orgid, 'deleted': {$ne: true} })
|
|
702
|
+
.select('name logoUrl')
|
|
703
|
+
.exec(cb);
|
|
704
|
+
};
|
|
705
|
+
|
|
696
706
|
Organization.statics.getBoardsOfPerson = function getBoardsOfPerson(personId, cb) {
|
|
697
707
|
|
|
698
708
|
var self = this;
|
package/lib/Round.js
CHANGED
|
@@ -408,6 +408,7 @@ module.exports = function(mongoose, config) {
|
|
|
408
408
|
.populate('organization', 'name logoUrl')
|
|
409
409
|
.populate('people.person', 'name avatarUrl title')
|
|
410
410
|
.populate('vehicles.fund', 'name shortName')
|
|
411
|
+
.populate('vehicles.investments')
|
|
411
412
|
.populate({
|
|
412
413
|
path: 'vehicles.investments',
|
|
413
414
|
match: { customer: config.CUSTOMER_ID }
|
|
@@ -452,6 +453,7 @@ module.exports = function(mongoose, config) {
|
|
|
452
453
|
.populate('organization', 'name logoUrl')
|
|
453
454
|
.populate('people.person', 'name avatarUrl')
|
|
454
455
|
.populate('vehicles.fund')
|
|
456
|
+
.populate('vehicles.investments')
|
|
455
457
|
.exec(function(err, rounds) {
|
|
456
458
|
|
|
457
459
|
if (err) return cb(err, null);
|