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

Clean up API route handler registration implementation #307

Open
ethanwu10 opened this issue May 30, 2020 · 0 comments
Open

Clean up API route handler registration implementation #307

ethanwu10 opened this issue May 30, 2020 · 0 comments
Labels
refactoring Improve code quality

Comments

@ethanwu10
Copy link
Member

Since Fastify supports returning JS objects out of request handlers to be converted into JSON, we should clean up the API route handler in server/api/index.js to return the responses; this also explicitly ensures that the sending of the response is also the exit point of the handler.

@ethanwu10 ethanwu10 added the refactoring Improve code quality label May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Improve code quality
Projects
None yet
Development

No branches or pull requests

1 participant