@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/News.js CHANGED
@@ -54,7 +54,7 @@ module.exports = function(mongoose, config) {
54
54
  return result;
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
  };
@@ -85,7 +85,7 @@ module.exports = function(mongoose, config) {
85
85
  return result;
86
86
  };
87
87
 
88
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
88
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
89
89
  else { return run(); }
90
90
 
91
91
  };
@@ -107,7 +107,7 @@ module.exports = function(mongoose, config) {
107
107
  return result;
108
108
  };
109
109
 
110
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
110
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
111
111
  else { return run(); }
112
112
 
113
113
  };
@@ -122,7 +122,7 @@ module.exports = function(mongoose, config) {
122
122
  return await this.findByIdAndUpdate(_id, update, { new: true });
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
  };
package/lib/Note.js CHANGED
@@ -50,7 +50,7 @@ module.exports = function(mongoose, config) {
50
50
  return note;
51
51
  };
52
52
 
53
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
53
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
54
54
  else { return run(); }
55
55
 
56
56
  };
@@ -68,7 +68,7 @@ module.exports = function(mongoose, config) {
68
68
  return createdNote;
69
69
  };
70
70
 
71
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
71
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
72
72
  else { return run(); }
73
73
 
74
74
  };
@@ -91,7 +91,7 @@ module.exports = function(mongoose, config) {
91
91
  return result;
92
92
  };
93
93
 
94
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
94
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
95
95
  else { return run(); }
96
96
 
97
97
  };
@@ -117,7 +117,7 @@ module.exports = function(mongoose, config) {
117
117
  return result;
118
118
  };
119
119
 
120
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
120
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
121
121
  else { return run(); }
122
122
 
123
123
  };
@@ -132,7 +132,7 @@ module.exports = function(mongoose, config) {
132
132
  return await this.findByIdAndUpdate(_id, update, { new: true });
133
133
  };
134
134
 
135
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
135
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
136
136
  else { return run(); }
137
137
 
138
138
  };
@@ -1045,7 +1045,7 @@ module.exports = function(mongoose, config) {
1045
1045
  });
1046
1046
  };
1047
1047
 
1048
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1048
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1049
1049
  else { return run(); }
1050
1050
 
1051
1051
  };
@@ -1070,7 +1070,7 @@ module.exports = function(mongoose, config) {
1070
1070
  return null;
1071
1071
  };
1072
1072
 
1073
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1073
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1074
1074
  else { return run(); }
1075
1075
 
1076
1076
  };
@@ -1126,7 +1126,7 @@ module.exports = function(mongoose, config) {
1126
1126
  return result;
1127
1127
  };
1128
1128
 
1129
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1129
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1130
1130
  else { return run(); }
1131
1131
 
1132
1132
  };
@@ -1141,7 +1141,7 @@ module.exports = function(mongoose, config) {
1141
1141
  return result;
1142
1142
  };
1143
1143
 
1144
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1144
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1145
1145
  else { return run(); }
1146
1146
 
1147
1147
  };
@@ -1172,7 +1172,7 @@ module.exports = function(mongoose, config) {
1172
1172
  return result;
1173
1173
  };
1174
1174
 
1175
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1175
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1176
1176
  else { return run(); }
1177
1177
 
1178
1178
  };
@@ -1208,7 +1208,7 @@ module.exports = function(mongoose, config) {
1208
1208
  return result;
1209
1209
  };
1210
1210
 
1211
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1211
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1212
1212
  else { return run(); }
1213
1213
 
1214
1214
  };
@@ -1227,7 +1227,7 @@ module.exports = function(mongoose, config) {
1227
1227
  return result;
1228
1228
  };
1229
1229
 
1230
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1230
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1231
1231
  else { return run(); }
1232
1232
 
1233
1233
  };
@@ -1254,7 +1254,7 @@ module.exports = function(mongoose, config) {
1254
1254
  return result;
1255
1255
  };
1256
1256
 
1257
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1257
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1258
1258
  else { return run(); }
1259
1259
 
1260
1260
  };
@@ -1268,7 +1268,7 @@ module.exports = function(mongoose, config) {
1268
1268
  return result;
1269
1269
  };
1270
1270
 
1271
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1271
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1272
1272
  else { return run(); }
1273
1273
 
1274
1274
  };
@@ -1280,7 +1280,7 @@ module.exports = function(mongoose, config) {
1280
1280
  return result;
1281
1281
  };
1282
1282
 
1283
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1283
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1284
1284
  else { return run(); }
1285
1285
 
1286
1286
  };
@@ -1292,7 +1292,7 @@ module.exports = function(mongoose, config) {
1292
1292
  return result;
1293
1293
  };
1294
1294
 
1295
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1295
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1296
1296
  else { return run(); }
1297
1297
 
1298
1298
  };
@@ -1371,7 +1371,7 @@ module.exports = function(mongoose, config) {
1371
1371
  return result;
1372
1372
  };
1373
1373
 
1374
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1374
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1375
1375
  else { return run(); }
1376
1376
 
1377
1377
  };
@@ -1410,7 +1410,7 @@ module.exports = function(mongoose, config) {
1410
1410
  return result;
1411
1411
  };
1412
1412
 
1413
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1413
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1414
1414
  else { return run(); }
1415
1415
 
1416
1416
  };
@@ -1451,7 +1451,7 @@ module.exports = function(mongoose, config) {
1451
1451
  return result;
1452
1452
  };
1453
1453
 
1454
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1454
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1455
1455
  else { return run(); }
1456
1456
 
1457
1457
  };
@@ -1463,7 +1463,7 @@ module.exports = function(mongoose, config) {
1463
1463
  return result;
1464
1464
  };
1465
1465
 
1466
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1466
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1467
1467
  else { return run(); }
1468
1468
 
1469
1469
  };
@@ -1475,7 +1475,7 @@ module.exports = function(mongoose, config) {
1475
1475
  return result;
1476
1476
  };
1477
1477
 
1478
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1478
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1479
1479
  else { return run(); }
1480
1480
 
1481
1481
  };
@@ -1501,7 +1501,7 @@ module.exports = function(mongoose, config) {
1501
1501
  return result;
1502
1502
  };
1503
1503
 
1504
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1504
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1505
1505
  else { return run(); }
1506
1506
 
1507
1507
  };
@@ -1525,7 +1525,7 @@ module.exports = function(mongoose, config) {
1525
1525
  return result;
1526
1526
  };
1527
1527
 
1528
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1528
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1529
1529
  else { return run(); }
1530
1530
 
1531
1531
  };
@@ -1540,7 +1540,7 @@ module.exports = function(mongoose, config) {
1540
1540
  return result;
1541
1541
  };
1542
1542
 
1543
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1543
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1544
1544
  else { return run(); }
1545
1545
 
1546
1546
  };
@@ -1593,7 +1593,7 @@ module.exports = function(mongoose, config) {
1593
1593
  else { return helpers.cleanOrg(result, options.CUSTOMER_ID); }
1594
1594
  };
1595
1595
 
1596
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1596
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1597
1597
  else { return run(); }
1598
1598
 
1599
1599
  };
@@ -1610,7 +1610,7 @@ module.exports = function(mongoose, config) {
1610
1610
  return result;
1611
1611
  };
1612
1612
 
1613
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1613
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1614
1614
  else { return run(); }
1615
1615
 
1616
1616
  };
@@ -1636,7 +1636,7 @@ module.exports = function(mongoose, config) {
1636
1636
  else { return _.map(result, function(r) { return helpers.cleanOrg(r, options.CUSTOMER_ID) }); }
1637
1637
  };
1638
1638
 
1639
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1639
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1640
1640
  else { return run(); }
1641
1641
 
1642
1642
  };
@@ -1667,7 +1667,7 @@ module.exports = function(mongoose, config) {
1667
1667
  return result;
1668
1668
  };
1669
1669
 
1670
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1670
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1671
1671
  else { return run(); }
1672
1672
 
1673
1673
  };
@@ -1700,7 +1700,7 @@ module.exports = function(mongoose, config) {
1700
1700
  return filtered;
1701
1701
  };
1702
1702
 
1703
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1703
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1704
1704
  else { return run(); }
1705
1705
 
1706
1706
  };
@@ -1726,7 +1726,7 @@ module.exports = function(mongoose, config) {
1726
1726
  return result;
1727
1727
  };
1728
1728
 
1729
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1729
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1730
1730
  else { return run(); }
1731
1731
 
1732
1732
  };
@@ -1763,7 +1763,7 @@ module.exports = function(mongoose, config) {
1763
1763
  return filtered;
1764
1764
  };
1765
1765
 
1766
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1766
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1767
1767
  else { return run(); }
1768
1768
 
1769
1769
  };
@@ -1778,7 +1778,7 @@ module.exports = function(mongoose, config) {
1778
1778
  return result;
1779
1779
  };
1780
1780
 
1781
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1781
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1782
1782
  else { return run(); }
1783
1783
 
1784
1784
  };
@@ -1806,7 +1806,7 @@ module.exports = function(mongoose, config) {
1806
1806
  return result;
1807
1807
  };
1808
1808
 
1809
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1809
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1810
1810
  else { return run(); }
1811
1811
 
1812
1812
  };
@@ -1842,7 +1842,7 @@ module.exports = function(mongoose, config) {
1842
1842
  return result;
1843
1843
  };
1844
1844
 
1845
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1845
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1846
1846
  else { return run(); }
1847
1847
 
1848
1848
  };
@@ -1904,7 +1904,7 @@ module.exports = function(mongoose, config) {
1904
1904
  };
1905
1905
  };
1906
1906
 
1907
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1907
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1908
1908
  else { return run(); }
1909
1909
 
1910
1910
  };
@@ -1927,7 +1927,7 @@ module.exports = function(mongoose, config) {
1927
1927
  return result;
1928
1928
  };
1929
1929
 
1930
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1930
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1931
1931
  else { return run(); }
1932
1932
 
1933
1933
  };
@@ -1951,7 +1951,7 @@ module.exports = function(mongoose, config) {
1951
1951
  return result;
1952
1952
  };
1953
1953
 
1954
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1954
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1955
1955
  else { return run(); }
1956
1956
 
1957
1957
  };
@@ -1967,7 +1967,7 @@ module.exports = function(mongoose, config) {
1967
1967
  return result;
1968
1968
  };
1969
1969
 
1970
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1970
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1971
1971
  else { return run(); }
1972
1972
 
1973
1973
  };
@@ -1983,7 +1983,7 @@ module.exports = function(mongoose, config) {
1983
1983
  return result;
1984
1984
  };
1985
1985
 
1986
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1986
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1987
1987
  else { return run(); }
1988
1988
 
1989
1989
  };
@@ -2178,7 +2178,7 @@ module.exports = function(mongoose, config) {
2178
2178
  return orgs;
2179
2179
  };
2180
2180
 
2181
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
2181
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
2182
2182
  else { return run(); }
2183
2183
 
2184
2184
  };
@@ -2265,7 +2265,7 @@ module.exports = function(mongoose, config) {
2265
2265
  return result;
2266
2266
  };
2267
2267
 
2268
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
2268
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
2269
2269
  else { return run(); }
2270
2270
 
2271
2271
  };
@@ -2289,7 +2289,7 @@ module.exports = function(mongoose, config) {
2289
2289
  return await this.findByIdAndUpdate(_id, update, { new: true });
2290
2290
  };
2291
2291
 
2292
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
2292
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
2293
2293
  else { return run(); }
2294
2294
 
2295
2295
  };
package/lib/Person.js CHANGED
@@ -263,7 +263,7 @@ module.exports = function(mongoose, config) {
263
263
  });
264
264
  };
265
265
 
266
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
266
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
267
267
  else { return run(); }
268
268
 
269
269
  };
@@ -278,7 +278,7 @@ module.exports = function(mongoose, config) {
278
278
  return null;
279
279
  };
280
280
 
281
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
281
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
282
282
  else { return run(); }
283
283
 
284
284
  };
@@ -295,7 +295,7 @@ module.exports = function(mongoose, config) {
295
295
  return result;
296
296
  };
297
297
 
298
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
298
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
299
299
  else { return run(); }
300
300
 
301
301
  };
@@ -310,7 +310,7 @@ module.exports = function(mongoose, config) {
310
310
  return result;
311
311
  };
312
312
 
313
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
313
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
314
314
  else { return run(); }
315
315
 
316
316
  };
@@ -323,7 +323,7 @@ module.exports = function(mongoose, config) {
323
323
  return result;
324
324
  };
325
325
 
326
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
326
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
327
327
  else { return run(); }
328
328
 
329
329
  };
@@ -352,7 +352,7 @@ module.exports = function(mongoose, config) {
352
352
  return result;
353
353
  };
354
354
 
355
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
355
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
356
356
  else { return run(); }
357
357
 
358
358
  };
@@ -385,7 +385,7 @@ module.exports = function(mongoose, config) {
385
385
  return result;
386
386
  };
387
387
 
388
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
388
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
389
389
  else { return run(); }
390
390
 
391
391
  };
@@ -423,7 +423,7 @@ module.exports = function(mongoose, config) {
423
423
  return cleanedPerson;
424
424
  };
425
425
 
426
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
426
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
427
427
  else { return run(); }
428
428
 
429
429
  };
@@ -445,7 +445,7 @@ module.exports = function(mongoose, config) {
445
445
  return result;
446
446
  };
447
447
 
448
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
448
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
449
449
  else { return run(); }
450
450
 
451
451
  };
@@ -470,7 +470,7 @@ module.exports = function(mongoose, config) {
470
470
  return cleaned;
471
471
  };
472
472
 
473
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
473
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
474
474
  else { return run(); }
475
475
  };
476
476
 
@@ -484,7 +484,7 @@ module.exports = function(mongoose, config) {
484
484
  return result;
485
485
  };
486
486
 
487
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
487
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
488
488
  else { return run(); }
489
489
 
490
490
  };
@@ -512,7 +512,7 @@ module.exports = function(mongoose, config) {
512
512
  return result;
513
513
  };
514
514
 
515
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
515
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
516
516
  else { return run(); }
517
517
 
518
518
  };
@@ -568,7 +568,7 @@ module.exports = function(mongoose, config) {
568
568
  };
569
569
  };
570
570
 
571
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
571
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
572
572
  else { return run(); }
573
573
  };
574
574
 
@@ -590,7 +590,7 @@ module.exports = function(mongoose, config) {
590
590
  return result;
591
591
  };
592
592
 
593
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
593
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
594
594
  else { return run(); }
595
595
 
596
596
  };
@@ -614,7 +614,7 @@ module.exports = function(mongoose, config) {
614
614
  return result;
615
615
  };
616
616
 
617
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
617
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
618
618
  else { return run(); }
619
619
 
620
620
  };
@@ -951,7 +951,7 @@ module.exports = function(mongoose, config) {
951
951
  }
952
952
  };
953
953
 
954
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
954
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
955
955
  else { return run(); }
956
956
 
957
957
  };
@@ -1037,7 +1037,7 @@ module.exports = function(mongoose, config) {
1037
1037
  return cleaned;
1038
1038
  };
1039
1039
 
1040
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1040
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1041
1041
  else { return run(); }
1042
1042
 
1043
1043
  };
@@ -1056,7 +1056,7 @@ module.exports = function(mongoose, config) {
1056
1056
  return result;
1057
1057
  };
1058
1058
 
1059
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1059
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1060
1060
  else { return run(); }
1061
1061
 
1062
1062
  };
@@ -1079,7 +1079,7 @@ module.exports = function(mongoose, config) {
1079
1079
  return await this.findByIdAndUpdate(_id, update, { new: true });
1080
1080
  };
1081
1081
 
1082
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
1082
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
1083
1083
  else { return run(); }
1084
1084
 
1085
1085
  };
package/lib/Rate.js CHANGED
@@ -30,7 +30,7 @@ module.exports = function(mongoose, config) {
30
30
  return result;
31
31
  };
32
32
 
33
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
33
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
34
34
  else { return run(); }
35
35
 
36
36
  };
@@ -44,7 +44,7 @@ module.exports = function(mongoose, config) {
44
44
  return result;
45
45
  };
46
46
 
47
- if (typeof cb === 'function') { run().then(result => cb(null, result)).catch(cb); return; }
47
+ if (typeof cb === 'function') { run().then(result => cb(null, result), err => cb(err)); return; }
48
48
  else { return run(); }
49
49
 
50
50
  };
@@ -59,7 +59,7 @@ module.exports = function(mongoose, config) {
59
59
  return await this.findByIdAndUpdate(_id, update, { new: true });
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
  };