@dhyasama/totem-models 1.8.0 → 1.9.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/CapTable.js +12 -1
  2. package/package.json +1 -1
package/lib/CapTable.js CHANGED
@@ -259,7 +259,18 @@ module.exports = function(mongoose, config) {
259
259
  var self = this;
260
260
 
261
261
  self
262
- .find({ 'stakeholder.fund': { $in: fundIds } })
262
+ .find({ 'stakeholders.fund': { $in: fundIds } })
263
+ .populate('organization', 'name logoUrl')
264
+ .exec(cb);
265
+
266
+ };
267
+
268
+ CapTable.statics.getByPerson = function getByFunds(personId, cb) {
269
+
270
+ var self = this;
271
+
272
+ self
273
+ .find({ 'stakeholders.person': personId })
263
274
  .populate('organization', 'name logoUrl')
264
275
  .exec(cb);
265
276
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",