nss-evening-cohort-12 / bangazon-api-medlenmage

bangazon-api-medlenmage created by GitHub Classroom
0 stars 1 forks source link

sold_filter had less than and not greater than #32

Closed medlenmage closed 3 years ago

medlenmage commented 3 years ago

filtering for number of products sold was no filtering correctly

Changes

Requests / Responses

Request

GET /products?number_sold=2 gets products that have been sold 2 or more times

Response

HTTP/1.1 200 OK

{
        "id": 50,
        "name": "Escalade EXT",
        "price": 926.92,
        "number_sold": 2,
        "description": "2008 Cadillac",
        "quantity": 2,
        "created_date": "2019-02-01",
        "location": "Lokavec",
        "image_path": null,
        "average_rating": 3.25
    },
    {
        "id": 52,
        "name": "900",
        "price": 1296.98,
        "number_sold": 1,
        "description": "1987 Saab",
        "quantity": 2,
        "created_date": "2019-03-19",
        "location": "Vratsa",
        "image_path": null,
        "average_rating": 0
    },

Testing

Description of how to test code...

Related Issues