nicorithner / rails_engine

Turing Module 3 - Api rails app exercise
0 stars 0 forks source link

Multi-Finders #25

Closed nicorithner closed 3 years ago

nicorithner commented 3 years ago

This endpoint should return all records that match a set of criteria. Criteria will be input through query parameters.

The URI should follow this pattern: GET /api/v1//find_all?=

This endpoint should follow all of the same requirements for matching as the Single Finder endpoints.

Example JSON response for GET /api/v1/merchants/find_all?name=ring

{
  "data": [
    {
      "id": "4",
      "type": "merchant",
      "attributes": {
        "name": "Ring World"
      }
    },
    {
      "id": "1",
      "type": "merchant",
      "attributes": {
        "name": "Turing School"
      }
    }
  ]
}