@aeriajs/http 0.0.198 → 0.0.200
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/routing.js +2 -1
- package/package.json +7 -7
package/dist/routing.js
CHANGED
|
@@ -91,7 +91,7 @@ export const registerRoute = async (context, method, exp, cb, contract, options
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
if ('payload' in contract && contract.payload) {
|
|
94
|
-
const { error } = await checkUnprocessable(context.request.payload, contract.payload, context, {
|
|
94
|
+
const { error, result: validated } = await checkUnprocessable(context.request.payload, contract.payload, context, {
|
|
95
95
|
checkObjectIds: true,
|
|
96
96
|
coerceObjectIds: true,
|
|
97
97
|
context,
|
|
@@ -100,6 +100,7 @@ export const registerRoute = async (context, method, exp, cb, contract, options
|
|
|
100
100
|
if (error) {
|
|
101
101
|
return Result.error(error);
|
|
102
102
|
}
|
|
103
|
+
context.request.payload = validated;
|
|
103
104
|
}
|
|
104
105
|
if ('query' in contract && contract.query) {
|
|
105
106
|
const { error, result: validated } = await checkUnprocessable(context.request.query, contract.query, context, {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/http",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.200",
|
|
5
5
|
"description": "## Installation",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"aeriaMain": "tests/fixtures/aeriaMain.js",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"@aeriajs/entrypoint": "link:../entrypoint",
|
|
27
27
|
"@aeriajs/types": "link:../types",
|
|
28
28
|
"@aeriajs/validation": "link:../validation",
|
|
29
|
-
"mongodb": "^6.
|
|
29
|
+
"mongodb": "^6.18.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@aeriajs/common": "^0.0.
|
|
33
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
34
|
-
"@aeriajs/types": "^0.0.
|
|
35
|
-
"@aeriajs/validation": "^0.0.
|
|
36
|
-
"mongodb": "^6.
|
|
32
|
+
"@aeriajs/common": "^0.0.161",
|
|
33
|
+
"@aeriajs/entrypoint": "^0.0.169",
|
|
34
|
+
"@aeriajs/types": "^0.0.137",
|
|
35
|
+
"@aeriajs/validation": "^0.0.185",
|
|
36
|
+
"mongodb": "^6.18.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"test": "vitest run",
|