@tahminator/sapling 2.0.2-beta.3bec30d8 → 2.0.2-beta.62de85fd
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 +11 -8
- package/dist/index.mjs +11 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -696,16 +696,19 @@ Split these into separate @MiddlewareClass classes, or merge the logic into a si
|
|
|
696
696
|
if (schemas.param) request.params = await _parseOrThrow(schemas.param, request.params, "reqparams");
|
|
697
697
|
if (schemas.query) {
|
|
698
698
|
console.log("schemas.query exists");
|
|
699
|
-
console.log("schemas.query exists as " +
|
|
699
|
+
console.log("schemas.query exists as " + JSON.stringify(schemas.query));
|
|
700
700
|
const parsedQuery = await _parseOrThrow(schemas.query, request.query, "reqquery");
|
|
701
|
-
console.log({ parsedQuery });
|
|
702
|
-
|
|
703
|
-
Object.
|
|
704
|
-
|
|
705
|
-
|
|
701
|
+
console.log({ parsedQuery: JSON.stringify(parsedQuery) });
|
|
702
|
+
try {
|
|
703
|
+
Object.defineProperty(request, "query", {
|
|
704
|
+
value: parsedQuery,
|
|
705
|
+
writable: true,
|
|
706
|
+
configurable: true
|
|
706
707
|
});
|
|
707
|
-
|
|
708
|
-
|
|
708
|
+
} catch {
|
|
709
|
+
request.query = parsedQuery;
|
|
710
|
+
}
|
|
711
|
+
console.log("request.query rewritten, now is", { query: JSON.stringify(request.query) });
|
|
709
712
|
}
|
|
710
713
|
}
|
|
711
714
|
const result = await fn.bind(controllerInstance)(request, response, next);
|
package/dist/index.mjs
CHANGED
|
@@ -672,16 +672,19 @@ Split these into separate @MiddlewareClass classes, or merge the logic into a si
|
|
|
672
672
|
if (schemas.param) request.params = await _parseOrThrow(schemas.param, request.params, "reqparams");
|
|
673
673
|
if (schemas.query) {
|
|
674
674
|
console.log("schemas.query exists");
|
|
675
|
-
console.log("schemas.query exists as " +
|
|
675
|
+
console.log("schemas.query exists as " + JSON.stringify(schemas.query));
|
|
676
676
|
const parsedQuery = await _parseOrThrow(schemas.query, request.query, "reqquery");
|
|
677
|
-
console.log({ parsedQuery });
|
|
678
|
-
|
|
679
|
-
Object.
|
|
680
|
-
|
|
681
|
-
|
|
677
|
+
console.log({ parsedQuery: JSON.stringify(parsedQuery) });
|
|
678
|
+
try {
|
|
679
|
+
Object.defineProperty(request, "query", {
|
|
680
|
+
value: parsedQuery,
|
|
681
|
+
writable: true,
|
|
682
|
+
configurable: true
|
|
682
683
|
});
|
|
683
|
-
|
|
684
|
-
|
|
684
|
+
} catch {
|
|
685
|
+
request.query = parsedQuery;
|
|
686
|
+
}
|
|
687
|
+
console.log("request.query rewritten, now is", { query: JSON.stringify(request.query) });
|
|
685
688
|
}
|
|
686
689
|
}
|
|
687
690
|
const result = await fn.bind(controllerInstance)(request, response, next);
|