[openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)
David Tsiklauri
notifications at github.com
Mon Nov 18 18:36:08 UTC 2024
@nertc commented on this pull request.
> @@ -280,8 +280,10 @@
resource :profile, :only => [:edit, :update]
# friendships
- match "/user/:display_name/make_friend" => "friendships#make_friend", :via => [:get, :post], :as => "make_friend"
- match "/user/:display_name/remove_friend" => "friendships#remove_friend", :via => [:get, :post], :as => "remove_friend"
+ scope "/user/:display_name" do
+ resource :follow, :only => [:create, :destroy], :path => "follow"
+ end
+ get "/user/:display_name/follow" => "follows#index"
It's a page that either shows unfollow functionality or follow functionality based on if user already follows `:display_name`. As it is default `GET` method for this functionality (while other ones are `POST` and `DELETE`), I decided to name it `follows#index`. If you have an idea of a better name, I am open to it.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5261#discussion_r1847076063
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5261/review/2443411202 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241118/eca2180c/attachment-0001.htm>
More information about the rails-dev
mailing list