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

Add route to update/edit existing products in the db #12

Open
3 tasks
tylerhutcherson opened this issue Aug 16, 2022 · 0 comments
Open
3 tasks

Add route to update/edit existing products in the db #12

tylerhutcherson opened this issue Aug 16, 2022 · 0 comments
Assignees

Comments

@tylerhutcherson
Copy link
Collaborator

Description

To make our lives easier, it would be nice to have an update API call that allows us to make changes to data in the db remotely. This also needs to be protected by superuser access-level to prevent nefarious activity. No need to update the front end code yet since this is mostly for us internally.

TODO

  • Add a new r.put(...) route to routes.py that allows client to pass in a dictionary of product fields and updates the product record in the database accordingly (by primary_key...pk).
  • Make sure the route is protected by superuser auth.
  • Test with a local API client like Postman and ensure products are updated properly.
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