Skip to content

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

@tylerhutcherson

Description

@tylerhutcherson

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions