@dnax/core 0.9.4 → 0.9.5

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.
Files changed (2) hide show
  1. package/app/hono.ts +11 -10
  2. package/package.json +1 -1
package/app/hono.ts CHANGED
@@ -302,18 +302,9 @@ function HonoInstance(): typeof app {
302
302
 
303
303
  var response;
304
304
  var parseBody;
305
+ var body;
305
306
  var { action, collection, cleanDeep, useCache, name } =
306
307
  c.req.query() as Q;
307
- const service = getService(name, c.var["tenant-id"]);
308
- const col = getCollection(collection, c.var["tenant-id"]);
309
- const body = await c?.req
310
- ?.json()
311
- .then((e) => e)
312
- .catch((err) => null);
313
-
314
- useCache = stringToBoolean(useCache, false);
315
- if (body?.useCache) useCache = stringToBoolean(body.useCache, false);
316
-
317
308
  if (
318
309
  c.req.raw?.headers
319
310
  ?.get("content-type")
@@ -325,7 +316,17 @@ function HonoInstance(): typeof app {
325
316
  (await c?.req.parseBody({
326
317
  all: true,
327
318
  })) || {};
319
+ } else {
320
+ body = await c?.req
321
+ ?.json()
322
+ .then((e) => e)
323
+ .catch((err) => null);
328
324
  }
325
+ const service = getService(name, c.var["tenant-id"]);
326
+ const col = getCollection(collection, c.var["tenant-id"]);
327
+
328
+ useCache = stringToBoolean(useCache, false);
329
+ if (body?.useCache) useCache = stringToBoolean(body.useCache, false);
329
330
 
330
331
  const rest = new useRest({
331
332
  tenant_id: c.var["tenant-id"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.9.4",
3
+ "version": "0.9.5",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {