-
Notifications
You must be signed in to change notification settings - Fork 23
Added API for adding and updating notes and phones outside the change… #720
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
base: master
Are you sure you want to change the base?
Conversation
schroerbrian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. There are some test failures, but I assume you are working on those
config/routes.rb
Outdated
| post :create | ||
| put :update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these routes are already handled automatically by the resources method, according to https://guides.rubyonrails.org/routing.html#crud-verbs-and-actions. In fact, I think you're actually adding different routes compared to the Rails builtin ones, since this will create the create route at /notes/create, whereas the builtin is just at /notes (with a POST method), and yours will create the update route at /notes/update, whereas the builtin is /notes/:id/, where :id is the ID of the resource in the URL itself rather than as a parameter.
richardxia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes mostly LGTM, but you're failing some Postman tests.
… request paradigm