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

major typo in schema.md #215

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

major typo in schema.md #215

wants to merge 1 commit into from

Conversation

swikars1
Copy link
Contributor

The Elysia schema api is described wrong.

The Elysia schema api is described wrong.
@SaltyAom
Copy link
Member

SaltyAom commented Jan 4, 2024

I'm confused, the Elysia.schema usage is correct?
Maybe you're referring to .guard instead of .beforeHandle?

@swikars1
Copy link
Contributor Author

swikars1 commented Jan 4, 2024

I'm confused, the Elysia.schema usage is correct? Maybe you're referring to .guard instead of .beforeHandle?

the usage as shown in the docs is incorrect it seems.


```typescript
import { Elysia } from 'elysia'

new Elysia()
.get('/none', () => 'hi')
.schema({ // [!code ++]
.onBeforeHandle({ // [!code ++]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as maintainer suggested, this should be .guard({

@bogeychan bogeychan removed their assignment May 23, 2024
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

Successfully merging this pull request may close these issues.

None yet

4 participants