-
Notifications
You must be signed in to change notification settings - Fork 921
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
Note subscriptions API #5314
Note subscriptions API #5314
Conversation
bc8c005
to
d549604
Compare
d549604
to
6416cde
Compare
Looks good to me. Only two small things:
|
6416cde
to
1fa9aa6
Compare
Let me guess what's a fixup here. The fact that looking up the note is not required in |
No, that's not what I meant. A "fixup commit" is a commit that's added to a pull request that fixes problems with code introduced in the same pull request. From CONTRIBUTING.md (emphasis added)
In this PR, the first commit includes: + rescue ActiveRecord::RecordNotUnique
+ head :conflict The third commit includes rescue ActiveRecord::RecordNotUnique
- head :conflict
+ report_error "You are already subscribed to note #{note_id}.", :conflict Since the |
There weren't any problems with the code. Not having an error message is not a problem. You could as well have said that not adding |
1fa9aa6
to
53a3311
Compare
Changed to have error messages right away. The original version had response bodies intentionally undefined, and they are still intentionally undefined for ok responses. |
Merged, thanks for the updated version. I'm interested to hear any thoughts on the translations:
We can always refactor this separately, since it's not just this code that would be affected. |
Most of error messages are not translated. |
Is catching "fixup" commits (a line added (removed) in one commit and then removed (added) in a subsequent commit within the same PR) using a |
You can't do that automatically. |
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
andPOST .../unsubscribe
, this PR adds:POST /api/0.6/notes/:id/subscription
to add a subscriptionDELETE /api/0.6/notes/:id/subscription
to remove a subscription