When you return all of the videos from endpoint you should add an optional parameter that will change the ordering of the data
/?order=asc
and
/?order=desc
When you receive asc
the videos should be returned in ascending order by the number of votes. i.e. starting with the lowest number of votes.
When you receive desc
the videos should be returned in descending order by the number of votes. i.e. starting with the highest number of votes.
If no parameter is passed, the order should be descending.
When you've completed the Back End portion of this work, add a button to your React App that allows the user to choose to either
- Order the content by ascending
or
- Order the content by descending
When the button is clicked, the ordered should toggle between ascending and descending.