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

Unnecessary reply usage #17

Closed
pkulcsarnr opened this issue Nov 28, 2022 · 3 comments
Closed

Unnecessary reply usage #17

pkulcsarnr opened this issue Nov 28, 2022 · 3 comments

Comments

@pkulcsarnr
Copy link
Contributor

Based on the official documentation, in case of async / await usage there is no need to use the reply.send() syntax.

Previous syntax
fastify.get('/', (request, reply) => { reply.send({ hello: 'world' }) })
New syntax:
fastify.get('/', async (request, reply) => { return { hello: 'world' } })

@rpvsilva
Copy link
Owner

Thank you for your suggestions, do you want to implement these changes?

@pkulcsarnr
Copy link
Contributor Author

Yes, I can implement these changes.

@pkulcsarnr
Copy link
Contributor Author

@rpvsilva Opened a PR: #18

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