Skip to content

Commit eca7a97

Browse files
fix(cli): Use status instead of error in elysia (#591)
Co-authored-by: Aman Varshney <amanvarshney.work@gmail.com>
1 parent bb789cd commit eca7a97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/cli/templates/backend/server/elysia/src/index.ts.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ const app = new Elysia()
6565
)
6666
{{#if (eq auth "better-auth")}}
6767
.all("/api/auth/*", async (context) => {
68-
const { request } = context;
68+
const { request, status } = context;
6969
if (["POST", "GET"].includes(request.method)) {
7070
return auth.handler(request);
7171
}
72-
context.error(405);
72+
return status(405)
7373
})
7474
{{/if}}
7575
{{#if (eq api "orpc")}}

0 commit comments

Comments
 (0)