When the user first arrives at the Resources page on the front end, they are presented with whatever resources the database happens to serve up. Since we don't yet have featured categories on the front end, it would be nice to go ahead and serve up some resources that are relevant for beginners who maybe have no idea where to start on their learning journey. There are a bunch of great blog posts and similar "Getting Started" materials in the Getting Started category. From there, they can search for what they want, or filter by categories/languages.
Acceptance criteria: When a request is made without any filter parameters to the GET /resources endpoint, the API should return "Getting Started" resources, followed by all the other resources available (paginated).
This should be able to be accomplished by adding an ORDER BY clause in this particular case. I have an idea adapted from this stackoverflow post:
ORDER BY
CASE category
WHEN 'getting started' THEN 1
ELSE 2
END, id
I have no idea how to do this with Flask-SQLAlchemy, but we'll figure it out. Importantly, we shouldn't add this ORDER BY clause unless there are no other parameters at all. So we'll want some unit tests around this. I don't think it needs to be added to the documentation so we can skip making changes to the openapi.yaml file.
When the user first arrives at the Resources page on the front end, they are presented with whatever resources the database happens to serve up. Since we don't yet have featured categories on the front end, it would be nice to go ahead and serve up some resources that are relevant for beginners who maybe have no idea where to start on their learning journey. There are a bunch of great blog posts and similar "Getting Started" materials in the
Getting Startedcategory. From there, they can search for what they want, or filter by categories/languages.Acceptance criteria: When a request is made without any filter parameters to the
GET /resourcesendpoint, the API should return "Getting Started" resources, followed by all the other resources available (paginated).This should be able to be accomplished by adding an ORDER BY clause in this particular case. I have an idea adapted from this stackoverflow post:
I have no idea how to do this with Flask-SQLAlchemy, but we'll figure it out. Importantly, we shouldn't add this ORDER BY clause unless there are no other parameters at all. So we'll want some unit tests around this. I don't think it needs to be added to the documentation so we can skip making changes to the openapi.yaml file.