Create GET /visits endpoint which takes in a required user_id query param and returns all the visits for that user sorted in descending order of date and time.
It also takes an optional restaurant_id query param which filters the above results to only include the results from a particular restaurant.
The json response shoudl have the following format:
Create GET /visits endpoint which takes in a required
user_id
query param and returns all the visits for that user sorted in descending order of date and time. It also takes an optionalrestaurant_id
query param which filters the above results to only include the results from a particular restaurant.The json response shoudl have the following format:
You may use user_id 1 for which a user already exists in the DB for testing.
Please remember to update the openapi.yaml and openapi.json files to document the above changes!