CSCI-GA-2820-FA24-003 / products

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

Delete products by price range #19

Open niveditashankaranarayanan opened 2 months ago

niveditashankaranarayanan commented 2 months ago

Description: Enable Users to delete all products within a specified price range in one operation.

As a User I want to delete products within a certain range of prices, so that I can easily manage and control the pricing of my shop without having to delete products one by one.

Acceptance Criteria:
The API supports deleting products based on a minPrice and maxPrice range.
If no products are found within the range, return a 404 Not Found.
If deletion is successful, return a 200 OK with the count of deleted products.
If invalid price parameters are provided, return a 400 Bad Request.

**Example:**
Request (Delete products priced between $100 and $300):
`DELETE /products?minPrice=100&maxPrice=300`

Response (200 OK):

{ "message": "12 products priced between $100 and $300 were successfully deleted." }