@dhyasama/totem-models 12.7.0 → 12.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.
package/lib/Event.js CHANGED
@@ -52,7 +52,7 @@ module.exports = function(mongoose, config) {
52
52
  return result;
53
53
  };
54
54
 
55
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
55
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
56
56
  else { return run(); }
57
57
 
58
58
  };
@@ -82,7 +82,7 @@ module.exports = function(mongoose, config) {
82
82
  return result;
83
83
  };
84
84
 
85
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
85
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
86
86
  else { return run(); }
87
87
 
88
88
  };
@@ -111,7 +111,7 @@ module.exports = function(mongoose, config) {
111
111
  return result;
112
112
  };
113
113
 
114
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
114
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
115
115
  else { return run(); }
116
116
 
117
117
  };
@@ -136,7 +136,7 @@ module.exports = function(mongoose, config) {
136
136
  return result;
137
137
  };
138
138
 
139
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
139
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
140
140
  else { return run(); }
141
141
 
142
142
  };
@@ -155,7 +155,7 @@ module.exports = function(mongoose, config) {
155
155
  return await this.findByIdAndUpdate(_id, update, { new: true });
156
156
  };
157
157
 
158
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
158
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
159
159
  else { return run(); }
160
160
 
161
161
  };
@@ -48,7 +48,7 @@ module.exports = function(mongoose, config) {
48
48
  return result;
49
49
  };
50
50
 
51
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
51
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
52
52
  else { return run(); }
53
53
 
54
54
  };
@@ -94,7 +94,7 @@ module.exports = function(mongoose, config) {
94
94
  return result;
95
95
  };
96
96
 
97
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
97
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
98
98
  else { return run(); }
99
99
 
100
100
  };
@@ -123,7 +123,7 @@ module.exports = function(mongoose, config) {
123
123
  return result;
124
124
  };
125
125
 
126
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
126
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
127
127
  else { return run(); }
128
128
 
129
129
  };
@@ -141,7 +141,7 @@ module.exports = function(mongoose, config) {
141
141
  return await this.findByIdAndUpdate(_id, update, { new: true });
142
142
  };
143
143
 
144
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
144
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
145
145
  else { return run(); }
146
146
 
147
147
  };
package/lib/Financials.js CHANGED
@@ -341,7 +341,7 @@ module.exports = function(mongoose, config) {
341
341
  return result;
342
342
  };
343
343
 
344
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
344
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
345
345
  else { return run(); }
346
346
 
347
347
  };
@@ -374,7 +374,7 @@ module.exports = function(mongoose, config) {
374
374
  return;
375
375
  };
376
376
 
377
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
377
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
378
378
  else { return run(); }
379
379
 
380
380
  }
@@ -528,7 +528,7 @@ module.exports = function(mongoose, config) {
528
528
 
529
529
  };
530
530
 
531
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
531
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
532
532
  else { return run(); }
533
533
 
534
534
  }
@@ -619,7 +619,7 @@ module.exports = function(mongoose, config) {
619
619
 
620
620
  };
621
621
 
622
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
622
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
623
623
  else { return run(); }
624
624
 
625
625
  }
@@ -636,7 +636,7 @@ module.exports = function(mongoose, config) {
636
636
  return result;
637
637
  };
638
638
 
639
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
639
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
640
640
  else { return run(); }
641
641
 
642
642
  };
@@ -656,7 +656,7 @@ module.exports = function(mongoose, config) {
656
656
  return result;
657
657
  };
658
658
 
659
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
659
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
660
660
  else { return run(); }
661
661
 
662
662
  };
@@ -687,7 +687,7 @@ module.exports = function(mongoose, config) {
687
687
  return result;
688
688
  };
689
689
 
690
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
690
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
691
691
  else { return run(); }
692
692
 
693
693
  };
@@ -709,7 +709,7 @@ module.exports = function(mongoose, config) {
709
709
  return result;
710
710
  };
711
711
 
712
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
712
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
713
713
  else { return run(); }
714
714
 
715
715
  };
@@ -738,7 +738,7 @@ module.exports = function(mongoose, config) {
738
738
  return result;
739
739
  };
740
740
 
741
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
741
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
742
742
  else { return run(); }
743
743
 
744
744
  };
@@ -768,7 +768,7 @@ module.exports = function(mongoose, config) {
768
768
  else return result[0];
769
769
  };
770
770
 
771
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
771
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
772
772
  else { return run(); }
773
773
 
774
774
  };
@@ -793,7 +793,7 @@ module.exports = function(mongoose, config) {
793
793
  else return result[0];
794
794
  };
795
795
 
796
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
796
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
797
797
  else { return run(); }
798
798
 
799
799
  };
@@ -816,7 +816,7 @@ module.exports = function(mongoose, config) {
816
816
  return result;
817
817
  };
818
818
 
819
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
819
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
820
820
  else { return run(); }
821
821
 
822
822
  };
@@ -871,7 +871,7 @@ module.exports = function(mongoose, config) {
871
871
  return results;
872
872
  };
873
873
 
874
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
874
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
875
875
  else { return run(); }
876
876
 
877
877
  };
@@ -930,7 +930,7 @@ module.exports = function(mongoose, config) {
930
930
  return results;
931
931
  };
932
932
 
933
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
933
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
934
934
  else { return run(); }
935
935
 
936
936
  };
@@ -989,7 +989,7 @@ module.exports = function(mongoose, config) {
989
989
  return results;
990
990
  };
991
991
 
992
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
992
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
993
993
  else { return run(); }
994
994
 
995
995
  };
@@ -1054,7 +1054,7 @@ module.exports = function(mongoose, config) {
1054
1054
  return results;
1055
1055
  };
1056
1056
 
1057
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1057
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1058
1058
  else { return run(); }
1059
1059
 
1060
1060
  };
@@ -1112,7 +1112,7 @@ module.exports = function(mongoose, config) {
1112
1112
  return results;
1113
1113
  };
1114
1114
 
1115
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1115
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1116
1116
  else { return run(); }
1117
1117
 
1118
1118
  };
@@ -1145,7 +1145,7 @@ module.exports = function(mongoose, config) {
1145
1145
  return result;
1146
1146
  };
1147
1147
 
1148
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1148
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1149
1149
  else { return run(); }
1150
1150
 
1151
1151
  };
@@ -1165,7 +1165,7 @@ module.exports = function(mongoose, config) {
1165
1165
  return result;
1166
1166
  };
1167
1167
 
1168
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1168
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1169
1169
  else { return run(); }
1170
1170
 
1171
1171
  };
@@ -1186,7 +1186,7 @@ module.exports = function(mongoose, config) {
1186
1186
  return result;
1187
1187
  };
1188
1188
 
1189
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1189
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1190
1190
  else { return run(); }
1191
1191
 
1192
1192
  };
@@ -1202,7 +1202,7 @@ module.exports = function(mongoose, config) {
1202
1202
  return result;
1203
1203
  };
1204
1204
 
1205
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1205
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1206
1206
  else { return run(); }
1207
1207
 
1208
1208
  };
@@ -1220,7 +1220,7 @@ module.exports = function(mongoose, config) {
1220
1220
  return result;
1221
1221
  };
1222
1222
 
1223
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1223
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1224
1224
  else { return run(); }
1225
1225
 
1226
1226
  };
@@ -1237,7 +1237,7 @@ module.exports = function(mongoose, config) {
1237
1237
  return await this.findByIdAndUpdate(_id, update, { new: true });
1238
1238
  };
1239
1239
 
1240
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1240
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1241
1241
  else { return run(); }
1242
1242
 
1243
1243
  };
@@ -46,7 +46,7 @@ module.exports = function(mongoose, config) {
46
46
  return result;
47
47
  };
48
48
 
49
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
49
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
50
50
  else { return run(); }
51
51
 
52
52
  };
@@ -62,7 +62,7 @@ module.exports = function(mongoose, config) {
62
62
  return result;
63
63
  };
64
64
 
65
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
65
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
66
66
  else { return run(); }
67
67
 
68
68
  };
@@ -80,7 +80,7 @@ module.exports = function(mongoose, config) {
80
80
  return result;
81
81
  };
82
82
 
83
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
83
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
84
84
  else { return run(); }
85
85
 
86
86
  };
@@ -98,7 +98,7 @@ module.exports = function(mongoose, config) {
98
98
  return result;
99
99
  };
100
100
 
101
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
101
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
102
102
  else { return run(); }
103
103
 
104
104
  };
@@ -115,7 +115,7 @@ module.exports = function(mongoose, config) {
115
115
  return await this.findByIdAndUpdate(_id, update, { new: true });
116
116
  };
117
117
 
118
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
118
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
119
119
  else { return run(); }
120
120
 
121
121
  };
package/lib/Flag.js CHANGED
@@ -39,7 +39,7 @@ module.exports = function(mongoose, config) {
39
39
  };
40
40
  };
41
41
 
42
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
42
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
43
43
  else { return run(); }
44
44
 
45
45
  };
@@ -65,7 +65,7 @@ module.exports = function(mongoose, config) {
65
65
  return flag;
66
66
  };
67
67
 
68
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
68
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
69
69
  else { return run(); }
70
70
 
71
71
  };
@@ -84,7 +84,7 @@ module.exports = function(mongoose, config) {
84
84
  return result;
85
85
  };
86
86
 
87
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
87
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
88
88
  else { return run(); }
89
89
 
90
90
  };
@@ -106,7 +106,7 @@ module.exports = function(mongoose, config) {
106
106
  return result;
107
107
  };
108
108
 
109
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
109
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
110
110
  else { return run(); }
111
111
 
112
112
  };
@@ -121,7 +121,7 @@ module.exports = function(mongoose, config) {
121
121
  return await this.findByIdAndUpdate(_id, update, { new: true });
122
122
  };
123
123
 
124
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
124
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
125
125
  else { return run(); }
126
126
 
127
127
  };
package/lib/Folder.js CHANGED
@@ -35,7 +35,7 @@ module.exports = function(mongoose, config) {
35
35
  return result;
36
36
  };
37
37
 
38
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
38
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
39
39
  else { return run(); }
40
40
 
41
41
  };
@@ -59,7 +59,7 @@ module.exports = function(mongoose, config) {
59
59
  return result;
60
60
  };
61
61
 
62
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
62
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
63
63
  else { return run(); }
64
64
 
65
65
  };
@@ -74,7 +74,7 @@ module.exports = function(mongoose, config) {
74
74
  return await this.findByIdAndUpdate(_id, update, { new: true });
75
75
  };
76
76
 
77
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
77
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
78
78
  else { return run(); }
79
79
 
80
80
  };
@@ -89,7 +89,7 @@ module.exports = function(mongoose, config) {
89
89
  return result;
90
90
  };
91
91
 
92
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
92
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
93
93
  else { return run(); }
94
94
 
95
95
  };
package/lib/Fund.js CHANGED
@@ -74,7 +74,7 @@ module.exports = function(mongoose, config) {
74
74
  return result;
75
75
  };
76
76
 
77
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
77
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
78
78
  else { return run(); }
79
79
 
80
80
  };
@@ -86,7 +86,7 @@ module.exports = function(mongoose, config) {
86
86
  return result;
87
87
  };
88
88
 
89
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
89
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
90
90
  else { return run(); }
91
91
 
92
92
  };
@@ -98,7 +98,7 @@ module.exports = function(mongoose, config) {
98
98
  return result;
99
99
  };
100
100
 
101
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
101
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
102
102
  else { return run(); }
103
103
 
104
104
  };
@@ -110,7 +110,7 @@ module.exports = function(mongoose, config) {
110
110
  return result;
111
111
  };
112
112
 
113
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
113
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
114
114
  else { return run(); }
115
115
 
116
116
  };
@@ -122,7 +122,7 @@ module.exports = function(mongoose, config) {
122
122
  return result;
123
123
  };
124
124
 
125
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
125
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
126
126
  else { return run(); }
127
127
 
128
128
  };
@@ -140,7 +140,7 @@ module.exports = function(mongoose, config) {
140
140
  return result;
141
141
  };
142
142
 
143
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
143
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
144
144
  else { return run(); }
145
145
 
146
146
  };
@@ -201,7 +201,7 @@ module.exports = function(mongoose, config) {
201
201
  return result;
202
202
  };
203
203
 
204
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
204
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
205
205
  else { return run(); }
206
206
 
207
207
  };
@@ -221,7 +221,7 @@ module.exports = function(mongoose, config) {
221
221
  return await this.findByIdAndUpdate(_id, update, { new: true });
222
222
  };
223
223
 
224
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
224
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
225
225
  else { return run(); }
226
226
 
227
227
  };
@@ -244,7 +244,7 @@ module.exports = function(mongoose, config) {
244
244
  return result;
245
245
  };
246
246
 
247
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
247
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
248
248
  else { return run(); }
249
249
 
250
250
  };
@@ -268,7 +268,7 @@ module.exports = function(mongoose, config) {
268
268
  return result;
269
269
  };
270
270
 
271
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
271
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
272
272
  else { return run(); }
273
273
 
274
274
  };
@@ -65,7 +65,7 @@ module.exports = function(mongoose, config) {
65
65
  return result;
66
66
  };
67
67
 
68
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
68
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
69
69
  else { return run(); }
70
70
 
71
71
  };
@@ -93,7 +93,7 @@ module.exports = function(mongoose, config) {
93
93
  return result;
94
94
  };
95
95
 
96
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
96
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
97
97
  else { return run(); }
98
98
 
99
99
  };
@@ -113,7 +113,7 @@ module.exports = function(mongoose, config) {
113
113
  return result;
114
114
  };
115
115
 
116
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
116
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
117
117
  else { return run(); }
118
118
 
119
119
  };
@@ -141,7 +141,7 @@ module.exports = function(mongoose, config) {
141
141
  return result;
142
142
  };
143
143
 
144
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
144
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
145
145
  else { return run(); }
146
146
 
147
147
  };
@@ -164,7 +164,7 @@ module.exports = function(mongoose, config) {
164
164
  return result;
165
165
  };
166
166
 
167
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
167
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
168
168
  else { return run(); }
169
169
 
170
170
  };
@@ -185,7 +185,7 @@ module.exports = function(mongoose, config) {
185
185
  return result;
186
186
  };
187
187
 
188
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
188
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
189
189
  else { return run(); }
190
190
 
191
191
  };
@@ -206,7 +206,7 @@ module.exports = function(mongoose, config) {
206
206
  return result;
207
207
  };
208
208
 
209
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
209
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
210
210
  else { return run(); }
211
211
 
212
212
  };
@@ -250,7 +250,7 @@ module.exports = function(mongoose, config) {
250
250
  return result;
251
251
  };
252
252
 
253
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
253
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
254
254
  else { return run(); }
255
255
 
256
256
  };
@@ -272,7 +272,7 @@ module.exports = function(mongoose, config) {
272
272
  return result;
273
273
  };
274
274
 
275
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
275
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
276
276
  else { return run(); }
277
277
 
278
278
  };
@@ -319,7 +319,7 @@ module.exports = function(mongoose, config) {
319
319
  return result;
320
320
  };
321
321
 
322
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
322
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
323
323
  else { return run(); }
324
324
 
325
325
  };
@@ -359,7 +359,7 @@ module.exports = function(mongoose, config) {
359
359
  return interaction;
360
360
  };
361
361
 
362
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
362
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
363
363
  else { return run(); }
364
364
 
365
365
  };
@@ -397,7 +397,7 @@ module.exports = function(mongoose, config) {
397
397
  return result;
398
398
  };
399
399
 
400
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
400
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
401
401
  else { return run(); }
402
402
 
403
403
  };
@@ -419,7 +419,7 @@ module.exports = function(mongoose, config) {
419
419
  return result;
420
420
  };
421
421
 
422
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
422
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
423
423
  else { return run(); }
424
424
 
425
425
  };
@@ -436,7 +436,7 @@ module.exports = function(mongoose, config) {
436
436
  return await this.findByIdAndUpdate(_id, update, { new: true });
437
437
  };
438
438
 
439
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
439
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
440
440
  else { return run(); }
441
441
 
442
442
  };
package/lib/Investment.js CHANGED
@@ -114,7 +114,7 @@ module.exports = function(mongoose, config) {
114
114
  return organizationIds;
115
115
  };
116
116
 
117
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
117
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
118
118
  else { return run(); }
119
119
 
120
120
  };
@@ -138,7 +138,7 @@ module.exports = function(mongoose, config) {
138
138
  return null;
139
139
  };
140
140
 
141
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
141
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
142
142
  else { return run(); }
143
143
 
144
144
  };
@@ -157,7 +157,7 @@ module.exports = function(mongoose, config) {
157
157
  return await this.findByIdAndUpdate(_id, update, { new: true });
158
158
  };
159
159
 
160
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
160
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
161
161
  else { return run(); }
162
162
 
163
163
  };