Skip to content

Commit a72a4b8

Browse files
committed
refactor(app): use sendNoContent for null handling
1 parent 3f6d99e commit a72a4b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
MIMES,
1515
sendWebResponse,
1616
isWebResponse,
17+
sendNoContent,
1718
} from "./utils";
1819
import type { EventHandler, LazyEventHandler } from "./types";
1920

@@ -210,8 +211,7 @@ function normalizeLayer(input: InputLayer) {
210211
function handleHandlerResponse(event: H3Event, val: any, jsonSpace?: number) {
211212
// Empty Content
212213
if (val === null) {
213-
event.node.res.statusCode = 204;
214-
return send(event);
214+
return sendNoContent(event);
215215
}
216216

217217
if (val) {

0 commit comments

Comments
 (0)