@riddl/core 0.1.1 → 0.1.2

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.
@@ -28,7 +28,9 @@ export const parseBody = async (req, module) => {
28
28
  const clonedRequest = req.clone();
29
29
  // JSON body
30
30
  if ((_a = clonedRequest.headers.get("content-type")) === null || _a === void 0 ? void 0 : _a.startsWith("application/json")) {
31
- body = clonedRequest.json().catch(() => { throw error(400, "Invalid JSON body"); });
31
+ body = await clonedRequest.json().catch(() => {
32
+ throw error(400, "Invalid JSON body");
33
+ });
32
34
  }
33
35
  // Form body
34
36
  else if (((_b = clonedRequest.headers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddl/core",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {