@dnax/core 0.77.6 → 0.77.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.
@@ -683,7 +683,7 @@ class useRest {
683
683
  options?: Omit<optionCb, "withMeta" | "elementAt"> & {
684
684
  disableReadOnlyFields?: string[];
685
685
  }
686
- ): Promise<object[]> {
686
+ ): Promise<any[]> {
687
687
  return new Promise(async (resolve, reject) => {
688
688
  try {
689
689
  let sharedData = {};
@@ -2282,6 +2282,14 @@ class useRest {
2282
2282
  if (operationInstance?.update) {
2283
2283
  operationInstance.filter = formatData(operationInstance.filter);
2284
2284
  if (operationInstance?.update?.$set) {
2285
+ var { valid, output, error } = this.validator(
2286
+ collection,
2287
+ dotJson.object(operationInstance.update.$set),
2288
+ {
2289
+ partial: true,
2290
+ }
2291
+ );
2292
+ if (!valid) fn.error(error, 400);
2285
2293
  operationInstance.update.$set = deepSetId(
2286
2294
  col,
2287
2295
  omit(operationInstance.update.$set, [
@@ -2306,14 +2314,6 @@ class useRest {
2306
2314
  // upsert: true,
2307
2315
  }
2308
2316
  );
2309
- var { valid, output, error } = this.validator(
2310
- collection,
2311
- dotJson.object(operationInstance.update.$set),
2312
- {
2313
- partial: true,
2314
- }
2315
- );
2316
- if (!valid) fn.error(error, 400);
2317
2317
  }
2318
2318
  /* operationInstance.update.$currentDate = {
2319
2319
  updatedAt: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.77.6",
3
+ "version": "0.77.8",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {},