@dnax/core 0.77.5 → 0.77.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/driver/mongo/rest.ts +10 -10
- package/package.json +1 -1
package/driver/mongo/rest.ts
CHANGED
|
@@ -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,18 +2314,10 @@ 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
|
-
operationInstance.update.$currentDate = {
|
|
2318
|
+
/* operationInstance.update.$currentDate = {
|
|
2319
2319
|
updatedAt: true,
|
|
2320
|
-
};
|
|
2320
|
+
}; */
|
|
2321
2321
|
}
|
|
2322
2322
|
}
|
|
2323
2323
|
|