[openstreetmap/openstreetmap-website] Sort and order notes (#2381)

ENT8R notifications at github.com
Thu Oct 3 13:00:02 UTC 2019


Adds two new parameters to the notes search API to be able to
- specify the value the notes should be sorted by (either `created_at` or `updated_at`, `updated_at` remains the default value)
- specify the order of the returned notes (either `ASC` or `DESC`, `DESC` remains the default)

A new call to the notes search API may look like this:
[/api/0.6/notes/search?**sort_by=created_at&order_by=ASC**](https://api.openstreetmap.org/api/0.6/notes/search?sort_by=created_at&order_by=ASC)

See also #2380 for the reason of this pull request.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/2381

-- Commit Summary --

  * Sort and order notes by different values and ascending or descending order

-- File Changes --

    M app/controllers/api/notes_controller.rb (7)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/2381.patch
https://github.com/openstreetmap/openstreetmap-website/pull/2381.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2381
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20191003/4cee6d51/attachment.html>


More information about the rails-dev mailing list