You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
(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
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
etcThe text was updated successfully, but these errors were encountered: