X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/017f7da76f3d59a71c3cca481e0d3a20afe1c046..b31ac7430e86b9661b836269162d4c57d3c2d1fb:/config/routes.rb diff --git a/config/routes.rb b/config/routes.rb index aae32527a..b8689256d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -67,26 +67,26 @@ OpenStreetMap::Application.routes.draw do 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_preferences, :except => [:new, :create, :edit], :param => :preference_key, :path => "user/preferences" do collection do put "" => "user_preferences#update_all", :as => "" end end - resources :messages, :path => "user/messages", :constraints => { :id => /\d+/ }, :only => [:create, :show, :update, :destroy] do - collection do - get "inbox" - get "outbox" - end + resources :messages, :path => "user/messages", :constraints => { :id => /\d+/ }, :only => [:create, :show, :update, :destroy] + namespace :messages, :path => "user/messages" do + resource :inbox, :only => :show + resource :outbox, :only => :show end - post "/user/messages/:id" => "messages#update" + post "/user/messages/:id" => "messages#update", :as => nil resources :traces, :path => "gpx", :only => [:create, :show, :update, :destroy], :id => /\d+/ do scope :module => :traces do