LancePants97 / market_money_2405

1 stars 0 forks source link

9. Delete a MarketVendor #13

Open LancePants97 opened 3 months ago

LancePants97 commented 3 months ago
  1. This endpoint should follow the pattern of DELETE /api/v0/market_vendors, and it should destroy an existing association between a market and a vendor (so that a vendor no longer is listed at a certain market).
  2. The market_id and the vendor_id should be passed in via the body.
  3. When a MarketVendor resource can be found with the passed in vendor_id and market_id, that resource should be destroyed, and a response will be sent back with a 204 status, with nothing returned in the body of the request.
  4. After implementing the happy path for this endpoint, run it, and check that when you call GET /api/v0/markets/:id/vendors for the market in which you just deleted an association to a vendor, that you don’t see the recently removed vendor listed.
  5. If a MarketVendor resource can NOT be found with the passed in vendor_id and market_id, a 404 status code as well as a descriptive message should be sent back with the response.