Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in "Guard" example #313

Open
binyamin opened this issue Apr 7, 2024 · 1 comment
Open

Typo in "Guard" example #313

binyamin opened this issue Apr 7, 2024 · 1 comment

Comments

@binyamin
Copy link

binyamin commented Apr 7, 2024

What is the type of issue?

Example code is not working

What is the issue?

See elysiajs/elysia#528

The example under "Guard" seems to have a typo. The GET request has a body. According to MDN, this is not a good idea. The author of the discussion I referenced, couldn't even get the example to run.

app
    .get('/user/:id', ({ body }) => signUp(body))
    .post('/profile', ({ body }) => signIn(body), {
        beforeHandle: isUserExists
    })

Where did you find it?

https://elysiajs.com/life-cycle/before-handle#guard

@maxshay
Copy link

maxshay commented Jun 4, 2024

Related: #342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants