@dhyasama/totem-models 8.1.2 → 8.2.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.
@@ -555,6 +555,19 @@ module.exports = function(mongoose, config) {
555
555
 
556
556
  };
557
557
 
558
+ LimitedPartner.statics.removeCustomerCommitments = function removeCustomerCommitments(customerId, cb) {
559
+
560
+ const self = this;
561
+
562
+ let query = self.update(
563
+ { 'customer': customerId },
564
+ { $set: { fundsInvested: [] } },
565
+ { multi : true }
566
+ );
567
+ query.exec(cb);
568
+
569
+ };
570
+
558
571
  LimitedPartner.statics.search = function (terms, options, cb) {
559
572
 
560
573
  const self = this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.1.2",
3
+ "version": "8.2.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",
package/test/Account.js CHANGED
@@ -107,7 +107,7 @@ describe('Account', function() {
107
107
 
108
108
  it('finds by id', function(done) {
109
109
 
110
- Account.getById(accountid, {}, function(err, account) {
110
+ Account.getById(accountid, function(err, account) {
111
111
  should.not.exist(err);
112
112
  should.exist(account);
113
113
  account.id.should.equal(accountid);