Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 934 Bytes

File metadata and controls

33 lines (19 loc) · 934 Bytes

Level 299 - Week 2 - Back End - Stretch Goals

1) Ordered Data - Back End

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.

2) Ordered Data - Front End

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.