Skip to content

Conversation

@patriciaahuang
Copy link
Contributor

Overview

Implemented an extension to the previous search endpoint, so a user can specify what time range they want to search between.

Changes Made

I updated the search endpoint to include two more parameters (daysbefore and daysafter) so the user can specify how long before and after their exact departure date they would want to search rides.

Test Coverage

Using Postman, I created rides that were within the specified time range and outside the specified time range, and made sure

/api/search/search/depart/str:depart/daysbefore/int:daysbefore/daysafter/int:daysafter/start/str:start/end/str:end/radius/int:radius/

returned only the rides within the time frame specified by the parameters.


class SearchView(generics.GenericAPIView):
serializer_class = RideSerializer
permission_classes = api_settings.CONSUMER_PERMISSIONS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we get rid of these permission classes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants