@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.
@@ -337,7 +337,7 @@ module.exports = function(mongoose, config) {
337
337
  });
338
338
  };
339
339
 
340
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
340
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
341
341
  else { return run(); }
342
342
 
343
343
  };
@@ -354,7 +354,7 @@ module.exports = function(mongoose, config) {
354
354
  return null;
355
355
  };
356
356
 
357
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
357
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
358
358
  else { return run(); }
359
359
 
360
360
  };
@@ -415,7 +415,7 @@ module.exports = function(mongoose, config) {
415
415
  return lp;
416
416
  };
417
417
 
418
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
418
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
419
419
  else { return run(); }
420
420
 
421
421
  };
@@ -439,7 +439,7 @@ module.exports = function(mongoose, config) {
439
439
  return result;
440
440
  };
441
441
 
442
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
442
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
443
443
  else { return run(); }
444
444
 
445
445
  };
@@ -475,7 +475,7 @@ module.exports = function(mongoose, config) {
475
475
  return lps;
476
476
  };
477
477
 
478
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
478
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
479
479
  else { return run(); }
480
480
 
481
481
  };
@@ -507,7 +507,7 @@ module.exports = function(mongoose, config) {
507
507
  return lps;
508
508
  };
509
509
 
510
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
510
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
511
511
  else { return run(); }
512
512
 
513
513
  };
@@ -535,7 +535,7 @@ module.exports = function(mongoose, config) {
535
535
  return result;
536
536
  };
537
537
 
538
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
538
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
539
539
  else { return run(); }
540
540
 
541
541
  };
@@ -591,7 +591,7 @@ module.exports = function(mongoose, config) {
591
591
  };
592
592
  };
593
593
 
594
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
594
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
595
595
  else { return run(); }
596
596
 
597
597
  };
@@ -633,7 +633,7 @@ module.exports = function(mongoose, config) {
633
633
  return result;
634
634
  };
635
635
 
636
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
636
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
637
637
  else { return run(); }
638
638
 
639
639
  };
@@ -658,7 +658,7 @@ module.exports = function(mongoose, config) {
658
658
  return result;
659
659
  };
660
660
 
661
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
661
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
662
662
  else { return run(); }
663
663
 
664
664
  };
@@ -681,7 +681,7 @@ module.exports = function(mongoose, config) {
681
681
  return result;
682
682
  };
683
683
 
684
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
684
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
685
685
  else { return run(); }
686
686
 
687
687
  };
@@ -705,7 +705,7 @@ module.exports = function(mongoose, config) {
705
705
  return result;
706
706
  };
707
707
 
708
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
708
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
709
709
  else { return run(); }
710
710
 
711
711
  };
@@ -725,7 +725,7 @@ module.exports = function(mongoose, config) {
725
725
  return result;
726
726
  };
727
727
 
728
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
728
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
729
729
  else { return run(); }
730
730
 
731
731
  };
@@ -745,7 +745,7 @@ module.exports = function(mongoose, config) {
745
745
  return result;
746
746
  };
747
747
 
748
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
748
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
749
749
  else { return run(); }
750
750
 
751
751
  };
@@ -765,7 +765,7 @@ module.exports = function(mongoose, config) {
765
765
  return result;
766
766
  };
767
767
 
768
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
768
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
769
769
  else { return run(); }
770
770
 
771
771
  };
@@ -798,7 +798,7 @@ module.exports = function(mongoose, config) {
798
798
  return result;
799
799
  };
800
800
 
801
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
801
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
802
802
  else { return run(); }
803
803
 
804
804
  };
@@ -875,7 +875,7 @@ module.exports = function(mongoose, config) {
875
875
  return result;
876
876
  };
877
877
 
878
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
878
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
879
879
  else { return run(); }
880
880
 
881
881
  };
@@ -903,7 +903,7 @@ module.exports = function(mongoose, config) {
903
903
  return await this.findByIdAndUpdate(_id, update, { new: true });
904
904
  };
905
905
 
906
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
906
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
907
907
  else { return run(); }
908
908
 
909
909
  };
@@ -56,7 +56,7 @@ module.exports = function(mongoose, config) {
56
56
  return result;
57
57
  };
58
58
 
59
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
59
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
60
60
  else { return run(); }
61
61
 
62
62
  };
@@ -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
  };
@@ -109,7 +109,7 @@ module.exports = function(mongoose, config) {
109
109
  return result;
110
110
  };
111
111
 
112
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
112
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
113
113
  else { return run(); }
114
114
 
115
115
  };
@@ -133,7 +133,7 @@ module.exports = function(mongoose, config) {
133
133
  return result;
134
134
  };
135
135
 
136
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
136
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
137
137
  else { return run(); }
138
138
 
139
139
  };
@@ -155,7 +155,7 @@ module.exports = function(mongoose, config) {
155
155
  return result;
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
  // remove associated limited partner communications at the business logic layer
@@ -174,7 +174,7 @@ module.exports = function(mongoose, config) {
174
174
  return await this.findByIdAndUpdate(_id, update, { new: true });
175
175
  };
176
176
 
177
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
177
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
178
178
  else { return run(); }
179
179
 
180
180
  };
@@ -64,7 +64,7 @@ module.exports = function(mongoose, config) {
64
64
  return result;
65
65
  };
66
66
 
67
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
67
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
68
68
  else { return run(); }
69
69
 
70
70
  };
@@ -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
  };
@@ -103,7 +103,7 @@ module.exports = function(mongoose, config) {
103
103
  return result;
104
104
  };
105
105
 
106
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
106
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
107
107
  else { return run(); }
108
108
 
109
109
  };
@@ -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
  };
@@ -146,7 +146,7 @@ module.exports = function(mongoose, config) {
146
146
  return result;
147
147
  };
148
148
 
149
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
149
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
150
150
  else { return run(); }
151
151
 
152
152
  };
@@ -160,7 +160,7 @@ module.exports = function(mongoose, config) {
160
160
  return result;
161
161
  };
162
162
 
163
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
163
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
164
164
  else { return run(); }
165
165
 
166
166
  };
@@ -179,7 +179,7 @@ module.exports = function(mongoose, config) {
179
179
  return result;
180
180
  };
181
181
 
182
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
182
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
183
183
  else { return run(); }
184
184
 
185
185
  };
@@ -194,7 +194,7 @@ module.exports = function(mongoose, config) {
194
194
  return result;
195
195
  };
196
196
 
197
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
197
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
198
198
  else { return run(); }
199
199
 
200
200
  };
@@ -211,7 +211,7 @@ module.exports = function(mongoose, config) {
211
211
  return result;
212
212
  };
213
213
 
214
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
214
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
215
215
  else { return run(); }
216
216
 
217
217
  };
@@ -231,7 +231,7 @@ module.exports = function(mongoose, config) {
231
231
  return result;
232
232
  };
233
233
 
234
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
234
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
235
235
  else { return run(); }
236
236
 
237
237
  };
@@ -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
  };
@@ -267,7 +267,7 @@ module.exports = function(mongoose, config) {
267
267
  return await this.findByIdAndUpdate(_id, update, { new: true });
268
268
  };
269
269
 
270
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
270
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
271
271
  else { return run(); }
272
272
 
273
273
  };
@@ -49,7 +49,7 @@ module.exports = function(mongoose, config) {
49
49
  return result;
50
50
  };
51
51
 
52
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
52
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
53
53
  else { return run(); }
54
54
 
55
55
  };
@@ -71,7 +71,7 @@ module.exports = function(mongoose, config) {
71
71
  return result;
72
72
  };
73
73
 
74
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
74
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
75
75
  else { return run(); }
76
76
 
77
77
  };
@@ -84,7 +84,7 @@ module.exports = function(mongoose, config) {
84
84
  return null;
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
  };
@@ -101,7 +101,7 @@ module.exports = function(mongoose, config) {
101
101
  return await this.findByIdAndUpdate(_id, update, { new: true });
102
102
  };
103
103
 
104
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
104
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
105
105
  else { return run(); }
106
106
 
107
107
  };
@@ -63,7 +63,7 @@ module.exports = function(mongoose, config) {
63
63
  return result;
64
64
  };
65
65
 
66
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
66
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
67
67
  else { return run(); }
68
68
 
69
69
  };
@@ -80,7 +80,7 @@ module.exports = function(mongoose, config) {
80
80
  return await this.findByIdAndUpdate(_id, update, { new: true });
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
  };
package/lib/List.js CHANGED
@@ -87,7 +87,7 @@ module.exports = function(mongoose, config) {
87
87
  return saved;
88
88
  };
89
89
 
90
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
90
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
91
91
  else { return run(); }
92
92
 
93
93
  };
@@ -118,7 +118,7 @@ module.exports = function(mongoose, config) {
118
118
  return result;
119
119
  };
120
120
 
121
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
121
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
122
122
  else { return run(); }
123
123
 
124
124
  };
@@ -146,7 +146,7 @@ module.exports = function(mongoose, config) {
146
146
  return result;
147
147
  };
148
148
 
149
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
149
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
150
150
  else { return run(); }
151
151
 
152
152
  };
@@ -168,7 +168,7 @@ module.exports = function(mongoose, config) {
168
168
  return result;
169
169
  };
170
170
 
171
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
171
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
172
172
  else { return run(); }
173
173
 
174
174
  };
@@ -189,7 +189,7 @@ module.exports = function(mongoose, config) {
189
189
  return result;
190
190
  };
191
191
 
192
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
192
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
193
193
  else { return run(); }
194
194
 
195
195
  };
@@ -210,7 +210,7 @@ module.exports = function(mongoose, config) {
210
210
  return result;
211
211
  };
212
212
 
213
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
213
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
214
214
  else { return run(); }
215
215
 
216
216
  };
@@ -237,7 +237,7 @@ module.exports = function(mongoose, config) {
237
237
  return result;
238
238
  };
239
239
 
240
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
240
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
241
241
  else { return run(); }
242
242
 
243
243
  };
@@ -252,7 +252,7 @@ module.exports = function(mongoose, config) {
252
252
  return await this.findByIdAndUpdate(_id, update, { new: true });
253
253
  };
254
254
 
255
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
255
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
256
256
  else { return run(); }
257
257
 
258
258
  };
package/lib/Meeting.js CHANGED
@@ -72,7 +72,7 @@ module.exports = function(mongoose, config) {
72
72
  return result;
73
73
  };
74
74
 
75
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
75
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
76
76
  else { return run(); }
77
77
 
78
78
  };
@@ -92,7 +92,7 @@ module.exports = function(mongoose, config) {
92
92
  return result;
93
93
  };
94
94
 
95
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
95
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
96
96
  else { return run(); }
97
97
 
98
98
  };
@@ -112,7 +112,7 @@ module.exports = function(mongoose, config) {
112
112
  return result;
113
113
  };
114
114
 
115
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
115
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
116
116
  else { return run(); }
117
117
 
118
118
  };
@@ -147,7 +147,7 @@ module.exports = function(mongoose, config) {
147
147
  return result;
148
148
  };
149
149
 
150
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
150
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
151
151
  else { return run(); }
152
152
 
153
153
  };
@@ -168,7 +168,7 @@ module.exports = function(mongoose, config) {
168
168
  return meeting;
169
169
  };
170
170
 
171
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
171
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
172
172
  else { return run(); }
173
173
 
174
174
  };
@@ -185,7 +185,7 @@ module.exports = function(mongoose, config) {
185
185
  return await this.findByIdAndUpdate(_id, update, { new: true });
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
  };
package/lib/Message.js CHANGED
@@ -54,7 +54,7 @@ module.exports = function(mongoose, config) {
54
54
  });
55
55
  };
56
56
 
57
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
57
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
58
58
  else { return run(); }
59
59
 
60
60
  };
@@ -69,7 +69,7 @@ module.exports = function(mongoose, config) {
69
69
  return result;
70
70
  };
71
71
 
72
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
72
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
73
73
  else { return run(); }
74
74
 
75
75
  };
@@ -92,7 +92,7 @@ module.exports = function(mongoose, config) {
92
92
  return null;
93
93
  };
94
94
 
95
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
95
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
96
96
  else { return run(); }
97
97
 
98
98
  };
@@ -118,7 +118,7 @@ module.exports = function(mongoose, config) {
118
118
  return result;
119
119
  };
120
120
 
121
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
121
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
122
122
  else { return run(); }
123
123
 
124
124
  };
@@ -148,7 +148,7 @@ module.exports = function(mongoose, config) {
148
148
  return result;
149
149
  };
150
150
 
151
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
151
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
152
152
  else { return run(); }
153
153
 
154
154
  };
@@ -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
  };
@@ -180,7 +180,7 @@ module.exports = function(mongoose, config) {
180
180
  return result;
181
181
  };
182
182
 
183
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
183
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
184
184
  else { return run(); }
185
185
 
186
186
  };
@@ -210,7 +210,7 @@ module.exports = function(mongoose, config) {
210
210
  return result;
211
211
  };
212
212
 
213
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
213
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
214
214
  else { return run(); }
215
215
 
216
216
  };
@@ -241,7 +241,7 @@ module.exports = function(mongoose, config) {
241
241
  return result;
242
242
  };
243
243
 
244
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
244
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
245
245
  else { return run(); }
246
246
 
247
247
  };
@@ -277,7 +277,7 @@ module.exports = function(mongoose, config) {
277
277
  return result;
278
278
  };
279
279
 
280
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
280
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
281
281
  else { return run(); }
282
282
 
283
283
  };
@@ -317,7 +317,7 @@ module.exports = function(mongoose, config) {
317
317
  return result;
318
318
  };
319
319
 
320
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
320
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
321
321
  else { return run(); }
322
322
 
323
323
  };
@@ -347,7 +347,7 @@ module.exports = function(mongoose, config) {
347
347
  return result;
348
348
  };
349
349
 
350
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
350
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
351
351
  else { return run(); }
352
352
 
353
353
  };
@@ -368,7 +368,7 @@ module.exports = function(mongoose, config) {
368
368
  return result;
369
369
  };
370
370
 
371
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
371
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
372
372
  else { return run(); }
373
373
 
374
374
  };
@@ -390,7 +390,7 @@ module.exports = function(mongoose, config) {
390
390
  return result;
391
391
  };
392
392
 
393
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
393
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
394
394
  else { return run(); }
395
395
 
396
396
  };
@@ -412,7 +412,7 @@ module.exports = function(mongoose, config) {
412
412
  return result;
413
413
  };
414
414
 
415
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
415
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
416
416
  else { return run(); }
417
417
 
418
418
  };
@@ -433,7 +433,7 @@ module.exports = function(mongoose, config) {
433
433
  return result;
434
434
  };
435
435
 
436
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
436
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
437
437
  else { return run(); }
438
438
 
439
439
  };
@@ -459,7 +459,7 @@ module.exports = function(mongoose, config) {
459
459
  return await this.findByIdAndUpdate(_id, update, { new: true });
460
460
  };
461
461
 
462
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
462
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
463
463
  else { return run(); }
464
464
 
465
465
  };
@@ -45,7 +45,7 @@ module.exports = function(mongoose, config) {
45
45
  return result;
46
46
  };
47
47
 
48
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
48
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
49
49
  else { return run(); }
50
50
 
51
51
  };
@@ -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
  };
@@ -95,7 +95,7 @@ module.exports = function(mongoose, config) {
95
95
  return await this.findByIdAndUpdate(_id, update, { new: true });
96
96
  };
97
97
 
98
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
98
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
99
99
  else { return run(); }
100
100
 
101
101
  };