@dhyasama/totem-models 5.1.4 → 5.1.6

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/.npmignore ADDED
@@ -0,0 +1,14 @@
1
+ lib-cov
2
+ *.seed
3
+ *.log
4
+ *.csv
5
+ *.dat
6
+ *.out
7
+ *.pid
8
+ *.gz
9
+
10
+ npm-debug.log
11
+ node_modules
12
+
13
+ .DS_Store
14
+ .idea
package/lib/Deal.js CHANGED
@@ -33,10 +33,7 @@ module.exports = function(mongoose, config) {
33
33
  fundraise: {
34
34
  amount: { type: Number, default: 0 },
35
35
  valuation: { type: Number, default: 0 },
36
- details: [{
37
- key: { type: String, trim: true, required: true },
38
- value: { type: String, trim: true, required: true },
39
- }]
36
+ details: { type: String, trim: true }
40
37
  },
41
38
 
42
39
  resources: [{
@@ -184,6 +181,8 @@ module.exports = function(mongoose, config) {
184
181
  else if (lastStage != deal.stage) description += 'The deal was updated from ' + lastStage + ' to ' + deal.stage;
185
182
  else description = 'The deal was updated';
186
183
 
184
+ deal.history = deal.history || [];
185
+
187
186
  deal.history.push({
188
187
  timestamp: new Date(),
189
188
  account: user,