X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/00108bc9b7e9e03a47d89343e7f53eb924977ff8..ec73d70659686a51f5f4b6b737c9dea1daff8325:/config/routes.rb diff --git a/config/routes.rb b/config/routes.rb index e5c5772c3..7d200da86 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -17,21 +17,22 @@ OpenStreetMap::Application.routes.draw do get "capabilities" => "capabilities#show" get "permissions" => "permissions#show" - put "changeset/create" => "changesets#create" post "changeset/:id/upload" => "changesets#upload", :as => :changeset_upload, :id => /\d+/ - get "changeset/:id/download" => "changesets#download", :as => :changeset_download, :id => /\d+/ - get "changeset/:id" => "changesets#show", :as => :changeset_show, :id => /\d+/ post "changeset/:id/subscribe" => "changesets#subscribe", :as => :api_changeset_subscribe, :id => /\d+/ post "changeset/:id/unsubscribe" => "changesets#unsubscribe", :as => :api_changeset_unsubscribe, :id => /\d+/ - put "changeset/:id" => "changesets#update", :id => /\d+/ put "changeset/:id/close" => "changesets#close", :as => :changeset_close, :id => /\d+/ - get "changesets" => "changesets#index" - post "changeset/:id/comment" => "changeset_comments#create", :as => :changeset_comment, :id => /\d+/ post "changeset/comment/:id/hide" => "changeset_comments#destroy", :as => :changeset_comment_hide, :id => /\d+/ post "changeset/comment/:id/unhide" => "changeset_comments#restore", :as => :changeset_comment_unhide, :id => /\d+/ end namespace :api, :path => "api/0.6" do + resources :changesets, :only => [:index, :create] + resources :changesets, :path => "changeset", :id => /\d+/, :only => [:show, :update] do + resource :download, :module => :changesets, :only => :show + resources :changeset_comments, :path => "comment", :only => :create + end + put "changeset/create" => "changesets#create", :as => nil + resources :changeset_comments, :only => :index resources :nodes, :only => [:index, :create] @@ -297,10 +298,10 @@ OpenStreetMap::Application.routes.draw do resource :status, :only => :update end end - get "/user/:display_name/account", :to => redirect(:path => "/account/edit") + get "/user/:display_name/account", :to => redirect(:path => "/account") 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 + resource :account, :only => [:show, :update, :destroy] do scope :module => :accounts do resource :terms, :only => [:show, :update] resource :pd_declaration, :only => [:show, :create] @@ -308,6 +309,7 @@ OpenStreetMap::Application.routes.draw do resource :home, :only => :show end end + get "/account/edit", :to => redirect(:path => "/account"), :as => nil resource :dashboard, :only => [:show] resource :preferences, :only => [:show, :update]