From: Tom Hughes Date: Sun, 18 Aug 2024 11:01:17 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/5092' X-Git-Tag: live~226 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/fb854652ea47d7b3fa1657722f1da768eaba4f25?hp=-c Merge remote-tracking branch 'upstream/pull/5092' --- fb854652ea47d7b3fa1657722f1da768eaba4f25 diff --combined config/routes.rb index c9ba09818,099c285fc..125d6f810 --- a/config/routes.rb +++ b/config/routes.rb @@@ -246,10 -246,12 +246,12 @@@ OpenStreetMap::Application.routes.draw get "/user/:display_name/diary" => "diary_entries#index" get "/diary/:language" => "diary_entries#index" scope "/user/:display_name" do - resources :diary_entries, :path => "diary", :only => [:edit, :update, :show], :id => /\d+/ + resources :diary_entries, :path => "diary", :only => [:edit, :update, :show], :id => /\d+/ do + member do + post :hide, :unhide + end + end end - post "/user/:display_name/diary/:id/hide" => "diary_entries#hide", :id => /\d+/, :as => :hide_diary_entry - post "/user/:display_name/diary/:id/unhide" => "diary_entries#unhide", :id => /\d+/, :as => :unhide_diary_entry match "/user/:display_name/diary/:id/subscribe" => "diary_entries#subscribe", :via => [:get, :post], :as => :diary_entry_subscribe, :id => /\d+/ match "/user/:display_name/diary/:id/unsubscribe" => "diary_entries#unsubscribe", :via => [:get, :post], :as => :diary_entry_unsubscribe, :id => /\d+/ post "/user/:display_name/diary/:id/comments" => "diary_comments#create", :id => /\d+/, :as => :comment_diary_entry @@@ -331,7 -333,7 +333,7 @@@ get "/user/:display_name/blocks" => "user_blocks#blocks_on", :as => "user_blocks_on" get "/user/:display_name/blocks_by" => "user_blocks#blocks_by", :as => "user_blocks_by" get "/blocks/new/:display_name" => "user_blocks#new", :as => "new_user_block" - resources :user_blocks + resources :user_blocks, :except => :new match "/blocks/:id/revoke" => "user_blocks#revoke", :via => [:get, :post], :as => "revoke_user_block" match "/user/:display_name/blocks/revoke_all" => "user_blocks#revoke_all", :via => [:get, :post], :as => "revoke_all_user_blocks"