@dnax/core 0.15.6 → 0.15.8

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.
@@ -297,6 +297,7 @@ class useRest {
297
297
  data = await hashPasswordAuto(data, col);
298
298
  data = transformAllDate(data);
299
299
  data = deepSetId(col, data);
300
+ data = omit(data, ["_id", "createdAt", "updatedAt"]);
300
301
 
301
302
  var { valid, output, error } = this.validator(collection, data);
302
303
  if (!valid) fn.error(error, 400);
@@ -775,7 +776,7 @@ class useRest {
775
776
  if (update?.$set) {
776
777
  update.$set = deepSetId(
777
778
  col,
778
- omit(update.$set, ["createdAt", "updatedAt"])
779
+ omit(update.$set, ["createdAt", "updatedAt", "_id"])
779
780
  );
780
781
  update.$set = transformAllDate(update.$set);
781
782
  update.$set = await hashPasswordAuto(update.$set, col);
@@ -783,7 +784,7 @@ class useRest {
783
784
  //update.$set = deepSetId(col, update.$set);
784
785
  var { valid, output, error } = this.validator(
785
786
  collection,
786
- dotJson.object(update?.$set),
787
+ dotJson.object(update.$set),
787
788
  {
788
789
  partial: true,
789
790
  }
@@ -1030,7 +1031,7 @@ class useRest {
1030
1031
  if (update.$set) {
1031
1032
  update.$set = deepSetId(
1032
1033
  col,
1033
- omit(update.$set, ["createdAt", "updatedAt"])
1034
+ omit(update.$set, ["createdAt", "updatedAt", "_id"])
1034
1035
  );
1035
1036
  update.$set = transformAllDate(update.$set);
1036
1037
  update.$set = await hashPasswordAuto(update.$set, col);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.15.6",
3
+ "version": "0.15.8",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {