Destroy Products
Implement the DELETE function for the Product model in the application.
We'll cover the following
Our last stop for the product endpoints will be the destroy
action. The strategy here
will be similar to the create
and update
actions in that we’ll get the
logged user with a JWT token, fetch the product from the
user.products
association, and finally destroy it, returning a 204
code.
Get hands-on with 1400+ tech skills courses.