@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.
- package/lib/LimitedPartner.js +13 -0
- package/package.json +1 -1
- package/test/Account.js +1 -1
package/lib/LimitedPartner.js
CHANGED
|
@@ -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
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,
|
|
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);
|