CSCI-GA-2820-FA24-003 / products

NYU DevOps Products Service Fall 2024
Apache License 2.0
0 stars 1 forks source link

Fix RESTful Delete Endpoint #54

Closed HRHRHRHR666 closed 3 weeks ago

HRHRHRHR666 commented 4 weeks ago

As a Developer I need to modify the Delete endpoint to ensure it follows RESTful principles. so that the Delete operation behaves idempotently, returning 204_NO_CONTENT even if called multiple times.

Details and assumptions The Delete route should return 204_NO_CONTENT on a successful deletion, regardless of whether the resource was already deleted. It should never return 404_NOT_FOUND because RESTful principles dictate that Delete is idempotent. Test cases should be updated to reflect this behavior.


Acceptance Criteria:
Given a product exists
When I delete the product for the first time
Then I should receive a 204_NO_CONTENT response.

Given a product was already deleted
When I attempt to delete it again
Then I should receive the same 204_NO_CONTENT response.