nicot 1.3.6 → 1.3.7
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/dist/index.cjs +4 -4
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2361,7 +2361,7 @@ var CrudBase = class {
|
|
|
2361
2361
|
ent,
|
|
2362
2362
|
(0, import_lodash4.omit)(_ent, ...this._typeormRelations.map((r) => r.propertyName))
|
|
2363
2363
|
);
|
|
2364
|
-
const invalidReason = ent.isValidInCreate();
|
|
2364
|
+
const invalidReason = ent.isValidInCreate?.();
|
|
2365
2365
|
if (invalidReason) {
|
|
2366
2366
|
throw new import_nesties11.BlankReturnMessageDto(400, invalidReason).toException();
|
|
2367
2367
|
}
|
|
@@ -2586,7 +2586,7 @@ var CrudBase = class {
|
|
|
2586
2586
|
let result;
|
|
2587
2587
|
const ent = new this.entityClass();
|
|
2588
2588
|
Object.assign(ent, entPart);
|
|
2589
|
-
const invalidReason = ent.isValidInUpdate();
|
|
2589
|
+
const invalidReason = ent.isValidInUpdate?.();
|
|
2590
2590
|
if (invalidReason) {
|
|
2591
2591
|
throw new import_nesties11.BlankReturnMessageDto(400, invalidReason).toException();
|
|
2592
2592
|
}
|
|
@@ -2626,7 +2626,7 @@ var CrudBase = class {
|
|
|
2626
2626
|
ent,
|
|
2627
2627
|
(0, import_lodash4.omit)(_ent, ...this._typeormRelations.map((r) => r.propertyName))
|
|
2628
2628
|
);
|
|
2629
|
-
const invalidReason = ent.isValidInUpsert();
|
|
2629
|
+
const invalidReason = ent.isValidInUpsert?.();
|
|
2630
2630
|
if (invalidReason) {
|
|
2631
2631
|
throw new import_nesties11.BlankReturnMessageDto(400, invalidReason).toException();
|
|
2632
2632
|
}
|
|
@@ -2761,7 +2761,7 @@ var CrudBase = class {
|
|
|
2761
2761
|
const invalidResults = import_lodash4.default.compact(
|
|
2762
2762
|
await Promise.all(
|
|
2763
2763
|
ents.map(async (ent) => {
|
|
2764
|
-
const reason = ent.isValidInCreate();
|
|
2764
|
+
const reason = ent.isValidInCreate?.();
|
|
2765
2765
|
if (reason) {
|
|
2766
2766
|
return { entry: ent, result: reason };
|
|
2767
2767
|
}
|