X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8682b58154b0d42cb0dcc9f85efa806bea68210c..f816482778fad28424a4b2a151e0ba8ede2dcd97:/config/routes.rb diff --git a/config/routes.rb b/config/routes.rb index a38f8450f..98184e0e1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -21,8 +21,8 @@ OpenStreetMap::Application.routes.draw do post "changeset/:id/upload" => "api/changesets#upload", :as => :changeset_upload, :id => /\d+/ get "changeset/:id/download" => "api/changesets#download", :as => :changeset_download, :id => /\d+/ get "changeset/:id" => "api/changesets#show", :as => :changeset_show, :id => /\d+/ - post "changeset/:id/subscribe" => "api/changesets#subscribe", :as => :changeset_subscribe, :id => /\d+/ - post "changeset/:id/unsubscribe" => "api/changesets#unsubscribe", :as => :changeset_unsubscribe, :id => /\d+/ + post "changeset/:id/subscribe" => "api/changesets#subscribe", :as => :api_changeset_subscribe, :id => /\d+/ + post "changeset/:id/unsubscribe" => "api/changesets#unsubscribe", :as => :api_changeset_unsubscribe, :id => /\d+/ put "changeset/:id" => "api/changesets#update", :id => /\d+/ put "changeset/:id/close" => "api/changesets#close", :as => :changeset_close, :id => /\d+/ get "changesets" => "api/changesets#query" @@ -111,11 +111,14 @@ OpenStreetMap::Application.routes.draw do # Data browsing get "/way/:id" => "browse#way", :id => /\d+/, :as => :way get "/way/:id/history" => "browse#way_history", :id => /\d+/, :as => :way_history + resources :old_ways, :path => "/way/:id/history", :id => /\d+/, :version => /\d+/, :param => :version, :only => :show get "/node/:id" => "browse#node", :id => /\d+/, :as => :node get "/node/:id/history" => "browse#node_history", :id => /\d+/, :as => :node_history + resources :old_nodes, :path => "/node/:id/history", :id => /\d+/, :version => /\d+/, :param => :version, :only => :show get "/relation/:id" => "browse#relation", :id => /\d+/, :as => :relation get "/relation/:id/history" => "browse#relation_history", :id => /\d+/, :as => :relation_history - get "/changeset/:id" => "browse#changeset", :as => :changeset, :id => /\d+/ + resources :old_relations, :path => "/relation/:id/history", :id => /\d+/, :version => /\d+/, :param => :version, :only => :show + resources :changesets, :path => "changeset", :id => /\d+/, :only => :show get "/changeset/:id/comments/feed" => "changeset_comments#index", :as => :changeset_comments_feed, :id => /\d*/, :defaults => { :format => "rss" } resources :notes, :path => "note", :only => [:show, :new] @@ -124,6 +127,8 @@ OpenStreetMap::Application.routes.draw do get "/user/:display_name/notes" => "notes#index", :as => :user_notes get "/history/friends" => "changesets#index", :friends => true, :as => "friend_changesets", :defaults => { :format => :html } get "/history/nearby" => "changesets#index", :nearby => true, :as => "nearby_changesets", :defaults => { :format => :html } + match "/changeset/:id/subscribe" => "changesets#subscribe", :via => [:get, :post], :as => "changeset_subscribe" + match "/changeset/:id/unsubscribe" => "changesets#unsubscribe", :via => [:get, :post], :as => "changeset_unsubscribe" get "/browse/way/:id", :to => redirect(:path => "/way/%{id}") get "/browse/way/:id/history", :to => redirect(:path => "/way/%{id}/history") @@ -241,8 +246,8 @@ OpenStreetMap::Application.routes.draw do post "/user/:display_name/diary/:id/unhide" => "diary_entries#unhide", :id => /\d+/, :as => :unhide_diary_entry post "/user/:display_name/diary/:id/hidecomment/:comment" => "diary_entries#hidecomment", :id => /\d+/, :comment => /\d+/, :as => :hide_diary_comment post "/user/:display_name/diary/:id/unhidecomment/:comment" => "diary_entries#unhidecomment", :id => /\d+/, :comment => /\d+/, :as => :unhide_diary_comment - post "/user/:display_name/diary/:id/subscribe" => "diary_entries#subscribe", :as => :diary_entry_subscribe, :id => /\d+/ - post "/user/:display_name/diary/:id/unsubscribe" => "diary_entries#unsubscribe", :as => :diary_entry_unsubscribe, :id => /\d+/ + 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+/ # user pages resources :users, :path => "user", :param => :display_name, :only => [:show, :destroy]