X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f2a0f53cf5bd366452ee1923398d5064e7a0e738..e310767dcde76839c9c4fe452d5479ba531f3a65:/config/routes.rb diff --git a/config/routes.rb b/config/routes.rb index 178cda1cd..dae870a07 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -64,11 +64,11 @@ OpenStreetMap::Application.routes.draw do get "relations" => "relations#index" get "map" => "map#index" - - get "trackpoints" => "tracepoints#index" end namespace :api, :path => "api/0.6" do + resources :tracepoints, :path => "trackpoints", :only => :index + resources :users, :only => :index resources :users, :path => "user", :id => /\d+/, :only => :show resources :user_traces, :path => "user/gpx_files", :module => :users, :controller => :traces, :only => :index @@ -124,14 +124,16 @@ OpenStreetMap::Application.routes.draw do get "/relation/:id" => "relations#show", :id => /\d+/, :as => :relation get "/relation/:id/history" => "old_relations#index", :id => /\d+/, :as => :relation_history resources :old_relations, :path => "/relation/:id/history", :id => /\d+/, :version => /\d+/, :param => :version, :only => :show - resources :changesets, :path => "changeset", :id => /\d+/, :only => :show do - match :subscribe, :on => :member, :via => [:get, :post] - match :unsubscribe, :on => :member, :via => [:get, :post] + resources :changesets, :path => "changeset", :id => /\d+/, :only => :show do + resource :subscription, :controller => :changeset_subscriptions, :only => [:show, :create, :destroy] namespace :changeset_comments, :as => :comments, :path => :comments do resource :feed, :only => :show, :defaults => { :format => "rss" } end end + get "/changeset/:id/subscribe", :id => /\d+/, :to => redirect(:path => "/changeset/%{id}/subscription") + get "/changeset/:id/unsubscribe", :id => /\d+/, :to => redirect(:path => "/changeset/%{id}/subscription") + resources :notes, :path => "note", :id => /\d+/, :only => [:show, :new] get "/user/:display_name/history" => "changesets#index" @@ -246,8 +248,6 @@ OpenStreetMap::Application.routes.draw do get "/user/:display_name/diary/rss" => "diary_entries#rss", :defaults => { :format => :rss } get "/diary/:language/rss" => "diary_entries#rss", :defaults => { :format => :rss } get "/diary/rss" => "diary_entries#rss", :defaults => { :format => :rss } - get "/user/:display_name/diary/comments/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/user/%{display_name}/diary/comments") - get "/user/:display_name/diary/comments" => "diary_comments#index", :as => :diary_comments get "/user/:display_name/diary" => "diary_entries#index" get "/diary/:language" => "diary_entries#index" scope "/user/:display_name" do @@ -269,12 +269,15 @@ OpenStreetMap::Application.routes.draw do resources :users, :path => "user", :param => :display_name, :only => [:new, :create, :show] do resource :role, :controller => "user_roles", :path => "roles/:role", :only => [:create, :destroy] scope :module => :users do + resources :diary_comments, :only => :index + resources :changeset_comments, :only => :index resource :issued_blocks, :path => "blocks_by", :only => :show resource :received_blocks, :path => "blocks", :only => [:show, :edit, :destroy] resource :status, :only => :update end end get "/user/:display_name/account", :to => redirect(:path => "/account/edit") + get "/user/:display_name/diary/comments(/:page)", :page => /[1-9][0-9]*/, :to => redirect(:path => "/user/%{display_name}/diary_comments") resource :account, :only => [:edit, :update, :destroy] do scope :module => :accounts do