Skip to content

Commit

Permalink
fix(renderer): allow all h3 handled body types (#1755)
Browse files Browse the repository at this point in the history
* fix: directly return stream in render handler

* chore: apply automated fixes

* support any

* remove import

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Pooya Parsa <pooya@pi0.io>
  • Loading branch information
3 people authored Sep 26, 2023
1 parent d225d3b commit d5f8804
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/runtime/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { useNitroApp } from "./app";

export interface RenderResponse {
body: string;
body: any;
statusCode: number;
statusMessage: string;
headers: Record<string, string>;
Expand Down Expand Up @@ -58,8 +58,6 @@ export function defineRenderHandler(handler: RenderHandler) {
}

// Send response body
return typeof response.body === "string"
? response.body
: JSON.stringify(response.body);
return response.body
});
}

0 comments on commit d5f8804

Please sign in to comment.