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

Function naming #29

Open
oliverjam opened this issue Apr 17, 2020 · 1 comment
Open

Function naming #29

oliverjam opened this issue Apr 17, 2020 · 1 comment
Labels

Comments

@oliverjam
Copy link

I think you may have mixed up naming conventions for your handlers and model functions. Generally I would name handlers after the HTTP methods they handle (e.g. server.put("/questions/:id", questions.put). I'd use more descriptive names for the model, since those usually don't map one-to-one with HTTP methods. E.g. createUser, getQuestionById etc

@oliverjam
Copy link
Author

(The handler naming thing is definitely opinion though, if you prefer your put handler to be named updateQuestion then that's fine!) I would just try to also use descriptive names for the model

@VatsKan VatsKan added the P2 label Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants