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).
The market_id and the vendor_id should be passed in via the body.
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.
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.
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.
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).market_id
and thevendor_id
should be passed in via the body.MarketVendor
resource can be found with the passed invendor_id
andmarket_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.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.MarketVendor
resource can NOT be found with the passed invendor_id
andmarket_id
, a 404 status code as well as a descriptive message should be sent back with the response.