[openstreetmap/openstreetmap-website] Note subscriptions API (PR #5314)

Anton Khorev notifications at github.com
Tue Nov 12 23:03:22 UTC 2024


Part 4 of #5283

Adds API endpoints to subscribe/unsubscribe from a note.

This is like the changeset subscribe/unsubscribe
https://wiki.openstreetmap.org/wiki/API_v0.6#Subscribe:_POST_/api/0.6/changeset/#id/subscribe
but since we like resourceful routes, instead of `POST .../subscribe` and `POST .../unsubscribe`, this PR adds:

- `POST /api/0.6/notes/:id/subscription` to add a subscription
- `DELETE /api/0.6/notes/:id/subscription` to remove a subscription
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Add create note subscription api endpoint
  * Add destroy note subscription api endpoint

-- File Changes --

    M app/abilities/api_capability.rb (1)
    A app/controllers/api/note_subscriptions_controller.rb (22)
    M config/routes.rb (2)
    A test/controllers/api/note_subscriptions_controller_test.rb (132)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5314
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5314 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241112/1dad6608/attachment.htm>


More information about the rails-dev mailing list