Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting the video recommendations #6

Open
4 tasks
PERicci opened this issue May 4, 2024 · 0 comments
Open
4 tasks

Sorting the video recommendations #6

PERicci opened this issue May 4, 2024 · 0 comments

Comments

@PERicci
Copy link
Owner

PERicci commented May 4, 2024

From Full-Stack-Project-Assessment created by Dedekind561: CodeYourFuture#486

Description

When you return all of the videos from the /api/videos endpoint your API should support an optional query parameter that will change the ordering of the data

/?order=asc

and

/?order=desc

Acceptance criteria

  • 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 by ID.
  • Users can select an ordering in the frontend

Example

Please check https://lvl499c--cyf-fsa-solution.netlify.app for an example solution of this level

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

No branches or pull requests

1 participant