@dhyasama/totem-models 1.7.1 → 1.8.1

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/CapTable.js CHANGED
@@ -254,6 +254,17 @@ module.exports = function(mongoose, config) {
254
254
 
255
255
  };
256
256
 
257
+ CapTable.statics.getByFunds = function getByFunds(fundIds, cb) {
258
+
259
+ var self = this;
260
+
261
+ self
262
+ .find({ 'stakeholders.fund': { $in: fundIds } })
263
+ .populate('organization', 'name logoUrl')
264
+ .exec(cb);
265
+
266
+ };
267
+
257
268
  CapTable.statics.getForCustomer = function getForCustomer(orgId, customerId, cb) {
258
269
 
259
270
  var self = this;
@@ -1001,7 +1001,7 @@ module.exports = function(mongoose, config) {
1001
1001
 
1002
1002
  // if not public, keep it in if org is in the current customer's portfolio. otherwise remove it.
1003
1003
  // todo
1004
- console.log(customerPortfolio);
1004
+ //console.log(customerPortfolio);
1005
1005
 
1006
1006
  });
1007
1007
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "1.7.1",
3
+ "version": "1.8.1",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",