not-node 6.3.17 → 6.3.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "not-node",
3
- "version": "6.3.17",
3
+ "version": "6.3.19",
4
4
  "description": "node complimentary part for client side notFramework.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -14,17 +14,14 @@ module.exports = ({
14
14
  const phrase = modulePhrase(MODULE_NAME);
15
15
  const config = configInit.readerForModule(MODULE_NAME);
16
16
 
17
- const LogAction = ({ action, by, role, ip, root }, params = {}) => {
17
+ const LogAction = (action, identity, params = {}) => {
18
18
  Log &&
19
19
  Log.log({
20
20
  time: new Date(),
21
21
  module: MODULE_NAME,
22
22
  logic: MODEL_NAME,
23
23
  action,
24
- root,
25
- by,
26
- role,
27
- ip,
24
+ ...identity,
28
25
  params,
29
26
  });
30
27
  };
@@ -29,6 +29,19 @@ module.exports = ({
29
29
  populateBuilders = {},
30
30
  defaultPopulate = [],
31
31
  }) => {
32
+ const logDebugAction = (action, identity) => {
33
+ Log.debug(
34
+ `${MODULE_NAME}//Logic//${MODEL_NAME}//${action}`,
35
+ identity?.ip,
36
+ identity?.root
37
+ );
38
+ };
39
+ const checkShouldOwn = (data, shouldOwn, identity) => {
40
+ if (shouldOwn) {
41
+ data[ownerFieldName] = identity?.uid;
42
+ }
43
+ };
44
+
32
45
  /**
33
46
  * what to populate in action
34
47
  */
@@ -63,35 +76,13 @@ module.exports = ({
63
76
  * @param {import('../types').PreparedData} prepared
64
77
  * @returns {Promise<Object>}
65
78
  */
66
- static async _create({
67
- action,
68
- data,
69
- activeUser,
70
- ip,
71
- root = false,
72
- shouldOwn = false,
73
- }) {
74
- Log.debug(
75
- `${MODULE_NAME}//Logic//${MODEL_NAME}//${action}`,
76
- ip,
77
- root
78
- );
79
- if (shouldOwn) {
80
- data[ownerFieldName] = activeUser?._id;
81
- }
79
+ static async _create({ action, data, identity, shouldOwn = false }) {
80
+ logDebugAction(action, identity);
81
+ checkShouldOwn(data, shouldOwn, identity);
82
82
  const res = await getModel().add(data);
83
- LogAction(
84
- {
85
- action,
86
- by: activeUser?._id,
87
- role: activeUser?.role,
88
- ip,
89
- root,
90
- },
91
- {
92
- targetId: res._id,
93
- }
94
- );
83
+ LogAction(action, identity, {
84
+ targetId: res._id,
85
+ });
95
86
  return res;
96
87
  }
97
88
 
@@ -100,12 +91,10 @@ module.exports = ({
100
91
  * @param {import('../types').PreparedData} prepared
101
92
  * @returns {Promise<Object>} new document
102
93
  **/
103
- static async create({ data, activeUser, ip, root = false }) {
94
+ static async create({ data, identity }) {
104
95
  return await this._create({
105
96
  data,
106
- activeUser,
107
- ip,
108
- root,
97
+ identity,
109
98
  action: "create",
110
99
  shouldOwn: false,
111
100
  });
@@ -116,12 +105,10 @@ module.exports = ({
116
105
  * @param {import('../types').PreparedData} prepared
117
106
  * @returns {Promise<Object>} new document
118
107
  **/
119
- static async createOwn({ data, activeUser, ip, root = false }) {
108
+ static async createOwn({ data, identity }) {
120
109
  return await this._create({
121
110
  data,
122
- activeUser,
123
- ip,
124
- root,
111
+ identity,
125
112
  action: "createOwn",
126
113
  shouldOwn: true,
127
114
  });
@@ -135,37 +122,20 @@ module.exports = ({
135
122
  static async _updateOne({
136
123
  targetId,
137
124
  data,
138
- activeUser,
125
+ identity,
139
126
  action,
140
- root,
141
- ip,
142
127
  shouldOwn = true,
143
128
  }) {
144
- Log.debug(
145
- `${MODULE_NAME}//Logic//${MODEL_NAME}//${action}`,
146
- targetId,
147
- ip,
148
- root
149
- );
129
+ logDebugAction(action, identity);
150
130
  let query = {
151
131
  _id: targetId,
152
132
  };
153
- if (shouldOwn) {
154
- query[ownerFieldName] = activeUser?._id;
155
- }
133
+ checkShouldOwn(query, shouldOwn, identity);
156
134
  const result = await getModel().update(query, data);
157
- LogAction(
158
- {
159
- action,
160
- by: activeUser?._id,
161
- role: activeUser?.role,
162
- ip,
163
- },
164
- {
165
- targetId,
166
- version: result.__version,
167
- }
168
- );
135
+ LogAction(action, identity, {
136
+ targetId,
137
+ version: result.__version,
138
+ });
169
139
  return result;
170
140
  }
171
141
 
@@ -174,13 +144,11 @@ module.exports = ({
174
144
  * @param {import('../types').PreparedData} prepared
175
145
  * @returns {Promise<Object>} updated document
176
146
  **/
177
- static async update({ targetId, data, activeUser, ip, root = false }) {
147
+ static async update({ targetId, data, identity }) {
178
148
  return await this._updateOne({
179
149
  targetId,
180
150
  data,
181
- activeUser,
182
- ip,
183
- root,
151
+ identity,
184
152
  action: "update",
185
153
  shouldOwn: false,
186
154
  });
@@ -191,19 +159,11 @@ module.exports = ({
191
159
  * @param {import('../types').PreparedData} prepared
192
160
  * @returns {Promise<Object>} updated document
193
161
  **/
194
- static async updateOwn({
195
- targetId,
196
- data,
197
- activeUser,
198
- ip,
199
- root = false,
200
- }) {
162
+ static async updateOwn({ targetId, data, identity }) {
201
163
  return await this._updateOne({
202
164
  targetId,
203
165
  data,
204
- activeUser,
205
- ip,
206
- root,
166
+ identity,
207
167
  action: "updateOwn",
208
168
  shouldOwn: true,
209
169
  });
@@ -214,43 +174,19 @@ module.exports = ({
214
174
  * @param {import('../types').PreparedData} prepared
215
175
  * @returns {Promise<Object>} requested document
216
176
  **/
217
- static async _getOne({
218
- targetId,
219
- action,
220
- ip,
221
- root,
222
- activeUser,
223
- shouldOwn = true,
224
- }) {
225
- Log.debug(
226
- `${MODULE_NAME}//Logic//${MODEL_NAME}//${action}`,
227
- targetId,
228
- ip,
229
- root
230
- );
177
+ static async _getOne({ targetId, action, identity, shouldOwn = true }) {
178
+ logDebugAction(action, identity);
231
179
  let query = {};
232
- if (shouldOwn) {
233
- query[ownerFieldName] = activeUser?._id;
234
- }
180
+ checkShouldOwn(query, shouldOwn, identity);
235
181
  let populate = await getPopulate(action, {
236
182
  targetId,
237
- activeUser,
238
- ip,
239
- root,
183
+ identity,
240
184
  });
241
185
  const result = await getModel().getOne(targetId, populate, query);
242
- LogAction(
243
- {
244
- action,
245
- by: activeUser?._id,
246
- role: activeUser?.role,
247
- ip,
248
- },
249
- {
250
- targetId,
251
- version: result.__version,
252
- }
253
- );
186
+ LogAction(action, identity, {
187
+ targetId,
188
+ version: result.__version,
189
+ });
254
190
  return result;
255
191
  }
256
192
 
@@ -259,13 +195,11 @@ module.exports = ({
259
195
  * @param {import('../types').PreparedData} prepared
260
196
  * @returns {Promise<Object>} requested document
261
197
  **/
262
- static async get({ targetId, activeUser, ip, root = false }) {
198
+ static async get({ targetId, identity }) {
263
199
  return await this._getOne({
264
200
  targetId,
265
201
  action: "get",
266
- activeUser,
267
- ip,
268
- root,
202
+ identity,
269
203
  shouldOwn: false,
270
204
  });
271
205
  }
@@ -275,13 +209,11 @@ module.exports = ({
275
209
  * @param {import('../types').PreparedData} prepared
276
210
  * @returns {Promise<Object>} requested document
277
211
  **/
278
- static async getOwn({ targetId, activeUser, ip, root = false }) {
212
+ static async getOwn({ targetId, identity }) {
279
213
  return await this._getOne({
280
214
  targetId,
281
215
  action: "getOwn",
282
- activeUser,
283
- ip,
284
- root,
216
+ identity,
285
217
  shouldOwn: true,
286
218
  });
287
219
  }
@@ -294,44 +226,25 @@ module.exports = ({
294
226
  static async _getOneByID({
295
227
  targetID,
296
228
  action,
297
- ip,
298
- root,
299
- activeUser,
229
+ identity,
300
230
  shouldOwn = true,
301
231
  }) {
302
- Log.debug(
303
- `${MODULE_NAME}//Logic//${MODEL_NAME}//${action}`,
304
- targetID,
305
- ip,
306
- root
307
- );
232
+ logDebugAction(action, identity);
308
233
  let query = {};
309
- if (shouldOwn) {
310
- query[ownerFieldName] = activeUser?._id;
311
- }
234
+ checkShouldOwn(query, shouldOwn, identity);
312
235
  let populate = await getPopulate(action, {
313
236
  targetID,
314
- activeUser,
315
- ip,
316
- root,
237
+ identity,
317
238
  });
318
239
  const result = await getModel().getOneByID(
319
240
  targetID,
320
241
  query,
321
242
  populate
322
243
  );
323
- LogAction(
324
- {
325
- action,
326
- by: activeUser?._id,
327
- role: activeUser?.role,
328
- ip,
329
- },
330
- {
331
- targetID,
332
- version: result.__version,
333
- }
334
- );
244
+ LogAction(action, identity, {
245
+ targetID,
246
+ version: result.__version,
247
+ });
335
248
  return result;
336
249
  }
337
250
 
@@ -340,13 +253,11 @@ module.exports = ({
340
253
  * @param {import('../types').PreparedData} prepared
341
254
  * @returns {Promise<Object>} requested document
342
255
  **/
343
- static async getByID({ targetID, activeUser, ip, root = false }) {
256
+ static async getByID({ targetID, identity }) {
344
257
  return await this._getOneByID({
345
258
  targetID,
346
259
  action: "getByID",
347
- activeUser,
348
- ip,
349
- root,
260
+ identity,
350
261
  shouldOwn: false,
351
262
  });
352
263
  }
@@ -356,13 +267,11 @@ module.exports = ({
356
267
  * @param {import('../types').PreparedData} prepared
357
268
  * @returns {Promise<Object>} requested document
358
269
  **/
359
- static async getByIDOwn({ targetID, activeUser, ip, root = false }) {
270
+ static async getByIDOwn({ targetID, identity }) {
360
271
  return await this._getOneByID({
361
272
  targetID,
362
273
  action: "getByIDOwn",
363
- activeUser,
364
- ip,
365
- root,
274
+ identity,
366
275
  shouldOwn: true,
367
276
  });
368
277
  }
@@ -374,36 +283,18 @@ module.exports = ({
374
283
  **/
375
284
  static async _getOneRaw({
376
285
  targetId,
377
- activeUser,
378
- ip,
379
- root,
286
+ identity,
380
287
  action,
381
288
  shouldOwn = true,
382
289
  }) {
383
- Log.debug(
384
- `${MODULE_NAME}//Logic//${MODEL_NAME}//${action}`,
385
- targetId,
386
- ip,
387
- root
388
- );
290
+ logDebugAction(action, identity);
389
291
  let query = {};
390
- if (shouldOwn) {
391
- query[ownerFieldName] = activeUser?._id;
392
- }
292
+ checkShouldOwn(query, shouldOwn, identity);
393
293
  const result = await getModel().getOneRaw(targetId, query);
394
- LogAction(
395
- {
396
- action,
397
- by: activeUser?._id,
398
- role: activeUser?.role,
399
- ip,
400
- root,
401
- },
402
- {
403
- targetId,
404
- version: result.__version,
405
- }
406
- );
294
+ LogAction(action, identity, {
295
+ targetId,
296
+ version: result.__version,
297
+ });
407
298
  return result;
408
299
  }
409
300
 
@@ -412,14 +303,12 @@ module.exports = ({
412
303
  * @param {import('../types').PreparedData} prepared
413
304
  * @returns {Promise<Object>} requested document
414
305
  **/
415
- static async getRaw({ targetId, activeUser, ip, root = false }) {
306
+ static async getRaw({ targetId, identity }) {
416
307
  return await this._getOneRaw({
417
308
  targetId,
418
- activeUser,
309
+ identity,
419
310
  shouldOwn: false,
420
311
  action: "getRaw",
421
- ip,
422
- root,
423
312
  });
424
313
  }
425
314
 
@@ -428,14 +317,12 @@ module.exports = ({
428
317
  * @param {import('../types').PreparedData} prepared
429
318
  * @returns {Promise<Object>} requested document
430
319
  **/
431
- static async getOwnRaw({ targetId, activeUser, ip, root = false }) {
320
+ static async getOwnRaw({ targetId, identity }) {
432
321
  return await this._getOneRaw({
433
322
  targetId,
434
- activeUser,
323
+ identity,
435
324
  shouldOwn: true,
436
325
  action: "getOwnRaw",
437
- ip,
438
- root,
439
326
  });
440
327
  }
441
328
 
@@ -446,18 +333,11 @@ module.exports = ({
446
333
  **/
447
334
  static async _delete({
448
335
  action,
449
- ip,
450
- root,
451
336
  targetId,
452
- activeUser,
337
+ identity,
453
338
  shouldOwn = false,
454
339
  }) {
455
- Log.debug(
456
- `${MODULE_NAME}//Logic//${MODEL_NAME}//${action}`,
457
- targetId,
458
- ip,
459
- root
460
- );
340
+ logDebugAction(action, identity);
461
341
  const model = getModel();
462
342
  const versioning = ModelRoutine.versioning(model);
463
343
  if (versioning) {
@@ -465,12 +345,12 @@ module.exports = ({
465
345
  if (!itm) {
466
346
  throw new DBExceptionDocumentIsNotFound();
467
347
  }
468
- if (shouldOwn && !isOwner(itm, activeUser?._id)) {
348
+ if (shouldOwn && !isOwner(itm, identity?.uid)) {
469
349
  throw new DBExceptionDocumentIsNotOwnerByActiveUser({
470
350
  params: {
471
351
  targetId,
472
- activeUserId: activeUser?._id,
473
- role: activeUser?.role,
352
+ activeUserId: identity?.uid,
353
+ role: identity?.role,
474
354
  versioning,
475
355
  },
476
356
  });
@@ -479,34 +359,23 @@ module.exports = ({
479
359
  }
480
360
  } else {
481
361
  let query = { _id: targetId };
482
- if (shouldOwn) {
483
- query[ownerFieldName] = activeUser?._id;
484
- }
362
+ checkShouldOwn(query, shouldOwn, identity);
485
363
  const result = await model.findOneAndDelete(query).exec();
486
364
  if (!deleteResponseSuccess(result)) {
487
365
  throw new DBExceptionDeleteWasNotSuccessful({
488
366
  params: {
489
367
  result,
490
368
  targetId,
491
- activeUserId: activeUser?._id,
492
- role: activeUser?.role,
369
+ activeUserId: identity?.uid,
370
+ role: identity?.role,
493
371
  versioning,
494
372
  },
495
373
  });
496
374
  }
497
375
  }
498
- LogAction(
499
- {
500
- action,
501
- by: activeUser?._id,
502
- role: activeUser?.role,
503
- ip,
504
- root,
505
- },
506
- {
507
- targetId,
508
- }
509
- );
376
+ LogAction(action, identity, {
377
+ targetId,
378
+ });
510
379
  }
511
380
 
512
381
  /**
@@ -514,13 +383,11 @@ module.exports = ({
514
383
  * @param {import('../types').PreparedData} prepared
515
384
  * @returns {Promise<Object>} requested document
516
385
  **/
517
- static async delete({ targetId, activeUser, ip, root = false }) {
386
+ static async delete({ targetId, identity }) {
518
387
  await this._delete({
519
388
  action: "delete",
520
389
  targetId,
521
- root,
522
- ip,
523
- activeUser,
390
+ identity,
524
391
  shouldOwn: false,
525
392
  });
526
393
  }
@@ -530,13 +397,11 @@ module.exports = ({
530
397
  * @param {import('../types').PreparedData} prepared
531
398
  * @returns {Promise<Object>} requested document
532
399
  **/
533
- static async deleteOwn({ targetId, activeUser, ip, root = false }) {
400
+ static async deleteOwn({ targetId, identity }) {
534
401
  await this._delete({
535
402
  action: "deleteOwn",
536
403
  targetId,
537
- ip,
538
- root,
539
- activeUser,
404
+ identity,
540
405
  shouldOwn: true,
541
406
  });
542
407
  }
@@ -546,51 +411,26 @@ module.exports = ({
546
411
  * @param {import('../types').PreparedData} prepared
547
412
  * @returns {Promise<Array<Object>>}
548
413
  */
549
- static async _listAll({
550
- activeUser,
551
- ip,
552
- action,
553
- shouldOwn = false,
554
- root,
555
- }) {
556
- Log.debug(
557
- `${MODULE_NAME}//Logic//${MODEL_NAME}//${action}`,
558
- ip,
559
- root
560
- );
561
- let filter;
562
- if (shouldOwn) {
563
- filter = {
564
- [ownerFieldName]: activeUser?._id,
565
- };
566
- }
414
+ static async _listAll({ identity, action, shouldOwn = false }) {
415
+ logDebugAction(action, identity);
416
+ let filter = {};
417
+ checkShouldOwn(filter, shouldOwn, identity);
567
418
  const result = await getModel().listAll(filter);
568
- LogAction({
569
- action,
570
- by: activeUser?._id,
571
- role: activeUser?.role,
572
- ip,
573
- root,
574
- shouldOwn,
575
- });
419
+ LogAction(action, identity, { shouldOwn });
576
420
  return result;
577
421
  }
578
422
 
579
- static async listAll({ activeUser, ip, root }) {
423
+ static async listAll({ identity }) {
580
424
  return await this._listAll({
581
- activeUser,
582
- ip,
583
- root,
425
+ identity,
584
426
  action: "listAll",
585
427
  shouldOwn: false,
586
428
  });
587
429
  }
588
430
 
589
- static async listAllOwn({ activeUser, ip, root }) {
431
+ static async listAllOwn({ identity }) {
590
432
  return await this._listAll({
591
- activeUser,
592
- ip,
593
- root,
433
+ identity,
594
434
  action: "listAllOwn",
595
435
  shouldOwn: true,
596
436
  });
@@ -598,25 +438,18 @@ module.exports = ({
598
438
 
599
439
  static async _listAndCount({
600
440
  query,
601
- activeUser,
602
- ip,
603
441
  action,
604
- root,
442
+ identity,
605
443
  shouldOwn = false,
606
444
  }) {
607
- Log.debug(
608
- `${MODULE_NAME}//Logic//${MODEL_NAME}//${action}`,
609
- ip,
610
- root
611
- );
445
+ logDebugAction(action, identity);
612
446
  const { skip, size, sorter, filter, search } = query;
613
447
  let populate = await getPopulate(action, {
614
- activeUser,
615
- ip,
448
+ identity,
616
449
  });
617
450
  if (shouldOwn) {
618
451
  notFilter.filter.modifyRules(filter, {
619
- [ownerFieldName]: activeUser?._id,
452
+ [ownerFieldName]: identity?.uid,
620
453
  });
621
454
  }
622
455
  const result = await getModel().listAndCount(
@@ -627,60 +460,37 @@ module.exports = ({
627
460
  search,
628
461
  populate
629
462
  );
630
- LogAction({
631
- action,
632
- by: activeUser?._id,
633
- role: activeUser?.role,
634
- ip,
635
- root,
636
- shouldOwn,
637
- });
463
+ LogAction(action, identity, { shouldOwn });
638
464
  return result;
639
465
  }
640
466
 
641
- static async listAndCount({ query, activeUser, ip, root }) {
467
+ static async listAndCount({ query, identity }) {
642
468
  return await this._listAndCount({
643
469
  query,
644
- activeUser,
645
- ip,
646
- root,
470
+ identity,
647
471
  action: "listAndCount",
648
472
  shouldOwn: false,
649
473
  });
650
474
  }
651
475
 
652
- static async listAndCountOwn({ query, activeUser, ip, root }) {
476
+ static async listAndCountOwn({ query, identity }) {
653
477
  return await this._listAndCount({
654
478
  query,
655
- activeUser,
656
- ip,
657
- root,
479
+ identity,
658
480
  action: "listAndCountOwn",
659
481
  shouldOwn: true,
660
482
  });
661
483
  }
662
484
 
663
- static async _list({
664
- query,
665
- activeUser,
666
- ip,
667
- action,
668
- root,
669
- shouldOwn = false,
670
- }) {
671
- Log.debug(
672
- `${MODULE_NAME}//Logic//${MODEL_NAME}//${action}`,
673
- ip,
674
- root
675
- );
485
+ static async _list({ query, identity, action, shouldOwn = false }) {
486
+ logDebugAction(action, identity);
676
487
  const { skip, size, sorter, filter } = query;
677
488
  let populate = await getPopulate(action, {
678
- activeUser,
679
- ip,
489
+ identity,
680
490
  });
681
491
  if (shouldOwn) {
682
492
  notFilter.filter.modifyRules(filter, {
683
- [ownerFieldName]: activeUser?._id,
493
+ [ownerFieldName]: identity?.uid,
684
494
  });
685
495
  }
686
496
  const result = await getModel().listAndPopulate(
@@ -690,90 +500,57 @@ module.exports = ({
690
500
  filter,
691
501
  populate
692
502
  );
693
- LogAction({
694
- action,
695
- by: activeUser?._id,
696
- role: activeUser?.role,
697
- ip,
698
- root,
699
- shouldOwn,
700
- });
503
+ LogAction(action, identity, { shouldOwn });
701
504
  return result;
702
505
  }
703
506
 
704
- static async list({ query, activeUser, ip, root }) {
507
+ static async list({ query, identity }) {
705
508
  return await this._list({
706
509
  query,
707
- activeUser,
708
- ip,
709
- root,
510
+ identity,
710
511
  action: "list",
711
512
  shouldOwn: false,
712
513
  });
713
514
  }
714
515
 
715
- static async listOwn({ query, activeUser, ip, root }) {
516
+ static async listOwn({ query, identity }) {
716
517
  return await this._list({
717
518
  query,
718
- activeUser,
719
- ip,
720
- root,
519
+ identity,
721
520
  action: "listOwn",
722
521
  shouldOwn: true,
723
522
  });
724
523
  }
725
524
 
726
- static async _count({
727
- query,
728
- activeUser,
729
- ip,
730
- action,
731
- root,
732
- shouldOwn = false,
733
- }) {
734
- Log.debug(
735
- `${MODULE_NAME}//Logic//${MODEL_NAME}//${action}`,
736
- ip,
737
- root
738
- );
525
+ static async _count({ query, action, identity, shouldOwn = false }) {
526
+ logDebugAction(action, identity);
739
527
  const { filter, search } = query;
740
528
  if (shouldOwn) {
741
529
  notFilter.filter.modifyRules(filter, {
742
- [ownerFieldName]: activeUser?._id,
530
+ [ownerFieldName]: identity?.uid,
743
531
  });
744
532
  }
745
533
  if (search) {
746
534
  notFilter.filter.modifyRules(search, filter);
747
535
  }
748
536
  const result = await getModel().countWithFilter(search || filter);
749
- LogAction({
750
- action,
751
- by: activeUser?._id,
752
- role: activeUser?.role,
753
- ip,
754
- root,
755
- shouldOwn,
756
- });
537
+ LogAction(action, identity, { shouldOwn });
757
538
  return result;
758
539
  }
759
540
 
760
- static async count({ query, activeUser, ip, root }) {
541
+ static async count({ query, identity }) {
761
542
  return await this._count({
762
543
  query,
763
- activeUser,
764
- ip,
765
- root,
544
+ identity,
766
545
  action: "count",
767
546
  shouldOwn: false,
768
547
  });
769
548
  }
770
549
 
771
- static async countOwn({ query, activeUser, ip, root }) {
550
+ static async countOwn({ query, identity }) {
772
551
  return await this._count({
773
552
  query,
774
- activeUser,
775
- ip,
776
- root,
553
+ identity,
777
554
  action: "countOwn",
778
555
  shouldOwn: true,
779
556
  });
@@ -22,7 +22,6 @@ module.exports = ({ getLogic, before, after }) => {
22
22
  ...this.exceptionParamsPacker(prepared)
23
23
  );
24
24
  }
25
- prepared.root = true;
26
25
  return await getLogic().create(prepared);
27
26
  }
28
27
 
@@ -36,7 +35,6 @@ module.exports = ({ getLogic, before, after }) => {
36
35
  ...this.exceptionParamsPacker(prepared)
37
36
  );
38
37
  }
39
- prepared.root = true;
40
38
  return await getLogic().get(prepared);
41
39
  }
42
40
 
@@ -50,7 +48,6 @@ module.exports = ({ getLogic, before, after }) => {
50
48
  ...this.exceptionParamsPacker(prepared)
51
49
  );
52
50
  }
53
- prepared.root = true;
54
51
  return await getLogic().getByID(prepared);
55
52
  }
56
53
 
@@ -64,7 +61,6 @@ module.exports = ({ getLogic, before, after }) => {
64
61
  ...this.exceptionParamsPacker(prepared)
65
62
  );
66
63
  }
67
- prepared.root = true;
68
64
  return await getLogic().getRaw(prepared);
69
65
  }
70
66
 
@@ -78,7 +74,6 @@ module.exports = ({ getLogic, before, after }) => {
78
74
  ...this.exceptionParamsPacker(prepared)
79
75
  );
80
76
  }
81
- prepared.root = true;
82
77
  return await getLogic().update(prepared);
83
78
  }
84
79
 
@@ -92,7 +87,6 @@ module.exports = ({ getLogic, before, after }) => {
92
87
  ...this.exceptionParamsPacker(prepared)
93
88
  );
94
89
  }
95
- prepared.root = true;
96
90
  return await getLogic().listAll(prepared);
97
91
  }
98
92
 
@@ -106,7 +100,6 @@ module.exports = ({ getLogic, before, after }) => {
106
100
  ...this.exceptionParamsPacker(prepared)
107
101
  );
108
102
  }
109
- prepared.root = true;
110
103
  return await getLogic().listAndCount(prepared);
111
104
  }
112
105
 
@@ -120,7 +113,6 @@ module.exports = ({ getLogic, before, after }) => {
120
113
  ...this.exceptionParamsPacker(prepared)
121
114
  );
122
115
  }
123
- prepared.root = true;
124
116
  return await getLogic().list(prepared);
125
117
  }
126
118
 
@@ -134,7 +126,6 @@ module.exports = ({ getLogic, before, after }) => {
134
126
  ...this.exceptionParamsPacker(prepared)
135
127
  );
136
128
  }
137
- prepared.root = true;
138
129
  return await getLogic().count(prepared);
139
130
  }
140
131
 
@@ -148,7 +139,6 @@ module.exports = ({ getLogic, before, after }) => {
148
139
  ...this.exceptionParamsPacker(prepared)
149
140
  );
150
141
  }
151
- prepared.root = true;
152
142
  return await getLogic().delete(prepared);
153
143
  }
154
144