-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Project: ServerRelated to the server workspaceRelated to the server workspaceProject: WebRelated to the web workspaceRelated to the web workspacesorting and filtering
Description
Description
When retrieving resources by category or subcategory, our API endpoint returns the list sorted by those open as well as those closest to the user. It'd be useful to update this sort to consider the user's favorites.
Checklist
- when retrieving resources by a category and sub-category, and the user has favorites, the list of resources provided is sorted in the following order by default:
- resources that are open AND favorited sorted by those closest to the user
- resources that are open and NOT favorited sorted by those closest to the user
- resources that are closed AND favorited sorted by those closest to the user
- resources that are closed and NOT favorited sorted by those closest to the user
- when retrieving resources by a category and sub-category, and the user does not have favorites, the list of resources is not sorted by favorites
Tech Notes
- Favorites are stored in local storage, so we'll either need to send that list of favorites to the associated routes OR do the sorting on the front-end
- example of retrieving favorited resources
- Category API Route
- Category Model
- Subcategory API Route
- Sub-category Model
Metadata
Metadata
Assignees
Labels
Project: ServerRelated to the server workspaceRelated to the server workspaceProject: WebRelated to the web workspaceRelated to the web workspacesorting and filtering