From 569f5560487f51bf94b1cb48667ab55bdd1bd1fc Mon Sep 17 00:00:00 2001 From: Anton Reznikov Date: Thu, 23 Apr 2026 17:22:12 +0300 Subject: [PATCH] docs(best-practices): fix incorrect GET example using body in sign-in route The example in the Best Practices section (folder structure) defines a GET /sign-in route while specifying a request body in the types. Since GET requests should not include a body, this is inconsistent and misleading. Updated the example to use the appropriate HTTP method (POST) for routes that require a request body. --- docs/essential/best-practice.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/essential/best-practice.md b/docs/essential/best-practice.md index a40740fb..de687fd9 100644 --- a/docs/essential/best-practice.md +++ b/docs/essential/best-practice.md @@ -108,7 +108,7 @@ import { Auth } from './service' import { AuthModel } from './model' export const auth = new Elysia({ prefix: '/auth' }) - .get( + .post( '/sign-in', async ({ body, cookie: { session } }) => { const response = await Auth.signIn(body)