@kiyasov/platform-hono 1.1.2 → 1.1.3
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
|
@@ -53,15 +53,11 @@ export class HonoAdapter extends AbstractHttpAdapter<
|
|
|
53
53
|
private createRouteHandler(routeHandler: HonoHandler) {
|
|
54
54
|
return async (ctx: Context, next: Next) => {
|
|
55
55
|
await routeHandler(ctx.req, ctx, next);
|
|
56
|
-
|
|
56
|
+
const body = ctx.get("body");
|
|
57
|
+
return typeof body === "string" ? ctx.text(body) : ctx.json(body);
|
|
57
58
|
};
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
private send(ctx: Context) {
|
|
61
|
-
const body = ctx.get("body");
|
|
62
|
-
return typeof body === "string" ? ctx.text(body) : ctx.json(body);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
61
|
public get(pathOrHandler: string | HonoHandler, handler?: HonoHandler) {
|
|
66
62
|
const [routePath, routeHandler] = this.getRouteAndHandler(
|
|
67
63
|
pathOrHandler,
|