X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/be11f2075e8bbde0a1e0640fd254c64ee0c94f25..3eccf65d8cf2ceb13050f5c8d1396546631994be:/config/routes.rb diff --git a/config/routes.rb b/config/routes.rb index 0b18c47fd..39dd35f31 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -66,14 +66,14 @@ OpenStreetMap::Application.routes.draw do get "map" => "map#index" get "trackpoints" => "tracepoints#index" - - get "user/:id" => "users#show", :id => /\d+/, :as => :api_user - get "user/details" => "users#details" - get "user/gpx_files" => "users#gpx_files" - get "users" => "users#index", :as => :api_users end namespace :api, :path => "api/0.6" do + 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 + get "user/details" => "users#details" + resources :user_preferences, :except => [:new, :create, :edit], :param => :preference_key, :path => "user/preferences" do collection do put "" => "user_preferences#update_all", :as => "" @@ -284,7 +284,8 @@ OpenStreetMap::Application.routes.draw do end resource :dashboard, :only => [:show] - resource :preferences, :only => [:show, :edit, :update] + resource :preferences, :only => [:show, :update] + get "/preferences/edit", :to => redirect(:path => "/preferences") resource :profile, :only => [:edit, :update] # friendships