@kiyasov/platform-hono 1.1.7 → 1.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiyasov/platform-hono",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "Nest adapter for Hono",
5
5
  "author": "Islam Kiiasov",
6
6
  "license": "MIT",
@@ -211,11 +211,11 @@ export class HonoAdapter extends AbstractHttpAdapter<
211
211
  const contentType = ctx.req.header("content-type");
212
212
  switch (type) {
213
213
  case "application/json":
214
- if (contentType === "application/json")
214
+ if (contentType?.startsWith("application/json"))
215
215
  (ctx.req as any).body = await ctx.req.json();
216
216
  break;
217
217
  case "text/plain":
218
- if (contentType === "text/plain") {
218
+ if (contentType?.startsWith("text/plain")) {
219
219
  (ctx.req as any).rawBody = Buffer.from(await ctx.req.text());
220
220
  (ctx.req as any).body = await ctx.req.json();
221
221
  }