[openstreetmap/openstreetmap-website] Add changeset comment search api with filtering by author and time (PR #4359)
Anton Khorev
notifications at github.com
Tue Nov 21 16:38:08 UTC 2023
Similar to https://github.com/openstreetmap/openstreetmap-website/pull/4248, but for the api. This is the first part that doesn't require any db changes. The next step is to add searching by user who created the commented changeset, then it will be possible to have a user's discussed changeset list like on https://hdyc.neis-one.org/.
- There was a choice of route to add this request to, either `index` (used by changeset search), or `search` (used by notes search). I chose `index` because you like resourceful routes and there's no other obvious request to put at `index`.
- Common user, time interval from/to, limit methods moved to a mixin.
- Since `limit` parameter already existed for changeset comment feeds, added default/max limit settings like the ones for notes and changesets.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/4359
-- Commit Summary --
* Move common query limit method to mixin; use it changeset and note queries
* Add changeset comment query limit settings; use common query limit in changeset comment feeds
* Move common query time condition to mixin
* Move query notes by user value to mixin
* Add changeset comment search api with filtering by author and time
* Add changeset comment search api json format
-- File Changes --
M app/abilities/api_ability.rb (1)
M app/controllers/api/changeset_comments_controller.rb (15)
M app/controllers/api/changesets_controller.rb (46)
M app/controllers/api/notes_controller.rb (72)
M app/controllers/changeset_comments_controller.rb (25)
A app/controllers/concerns/query_methods.rb (91)
A app/views/api/changeset_comments/_changeset_comment.json.jbuilder (7)
A app/views/api/changeset_comments/_changeset_comment.xml.builder (11)
A app/views/api/changeset_comments/index.json.jbuilder (5)
A app/views/api/changeset_comments/index.xml.builder (7)
M app/views/api/changesets/_changeset.json.jbuilder (8)
M app/views/api/changesets/_changeset.xml.builder (12)
M config/routes.rb (2)
M config/settings.yml (4)
M test/controllers/api/changeset_comments_controller_test.rb (66)
M test/controllers/api/notes_controller_test.rb (31)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/4359.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4359.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4359
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4359 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231121/deba124d/attachment.htm>
More information about the rails-dev
mailing list