Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 22ee757

Browse files
authored
Adapters should return void (#16)
1 parent 03652d4 commit 22ee757

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/adapters/express.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ export const createOpenApiExpressMiddleware = <TRouter extends OpenApiRouter>(
1414
) => {
1515
const openApiHttpHandler = createOpenApiNodeHttpHandler(opts);
1616
return async (req: Request, res: Response) => {
17-
return openApiHttpHandler(req, res);
17+
await openApiHttpHandler(req, res);
1818
};
1919
};

src/adapters/next.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ export const createOpenApiNextHandler = <TRouter extends OpenApiRouter>(
5555
}
5656

5757
req.url = normalizePath(pathname);
58-
return openApiHttpHandler(req, res);
58+
await openApiHttpHandler(req, res);
5959
};
6060
};

src/adapters/standalone.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ export const createOpenApiHttpHandler = <TRouter extends OpenApiRouter>(
1414
) => {
1515
const openApiHttpHandler = createOpenApiNodeHttpHandler(opts);
1616
return async (req: IncomingMessage, res: ServerResponse) => {
17-
return openApiHttpHandler(req, res);
17+
await openApiHttpHandler(req, res);
1818
};
1919
};

0 commit comments

Comments
 (0)