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

Implemented "order by" API parameters for recipe, food, and unit queries #1356

Merged

Conversation

michael-genson
Copy link
Collaborator

Added two new parameters for get_all queries:
orderBy - allows for sorting by any valid property name (e.g. name or description)
orderDescending - boolean toggle for the order direction

I figure someone can utilize these to implement sorting & paging on the frontend. This also enables incremental syncs by sorting by "dateUpdated".

@hay-kot
Copy link
Collaborator

hay-kot commented Jun 11, 2022

Sweet! Thanks for this, looks great!

I was working on a pagination method on the generic repository, but I haven't had a chance to test it out. We have pretty limited ordering and sorting in the API, something that's on my never ending list to improve.

@hay-kot hay-kot merged commit 7541175 into mealie-recipes:mealie-next Jun 11, 2022
@michael-genson michael-genson deleted the mealie-next-api-extensions branch June 11, 2022 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants