[openstreetmap/openstreetmap-website] Add Messages API (PR #4605)

Milan Cvetkovic notifications at github.com
Tue May 28 12:37:42 UTC 2024


@milan-cvetkovic commented on this pull request.



> @@ -78,6 +78,15 @@
       end
     end
 
+    resources :messages, :path => "user/messages", :constraints => { :id => /\d+/ }, :only => [:create, :show, :destroy], :controller => "messages", :as => :api_messages do
+      collection do
+        get "inbox"
+        get "outbox"
+      end
+    end
+
+    post "/user/messages/:id" => "messages#update", :as => :api_message_update

Adding `:update` to resources above would add PUT and PATCH routes. PUT implies that the whole message would be modified, and I didn't see any PATCH ops in [API_v0.6 spec](https://wiki.openstreetmap.org/wiki/API_v0.6)

The API proposal suggested POST with single parameter: `read_status` with possible values of `true` and `false`, similar to how  "POST /api/0.6/changeset/comment/#comment_id/hide" works.

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

Message ID: <openstreetmap/openstreetmap-website/pull/4605/review/2082668956 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240528/74d844d0/attachment.htm>


More information about the rails-dev mailing list