X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/58ac035d4198759acdf49707145b474cf182e897..1f776bdcd85029a61cab2edf6daed740500f7f9d:/config/routes.rb diff --git a/config/routes.rb b/config/routes.rb index 12f6325ae..650818d6f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -78,15 +78,26 @@ OpenStreetMap::Application.routes.draw do end end + resources :messages, :path => "user/messages", :constraints => { :id => /\d+/ }, :only => [:create, :show, :destroy], :controller => "messages", :as => :api_messages do + collection do + get "inbox" + get "outbox" + end + end + + post "/user/messages/:id" => "messages#update", :as => :api_message_update + post "gpx/create" => "traces#create" get "gpx/:id" => "traces#show", :as => :api_trace, :id => /\d+/ put "gpx/:id" => "traces#update", :id => /\d+/ delete "gpx/:id" => "traces#destroy", :id => /\d+/ get "gpx/:id/details" => "traces#show", :id => /\d+/ get "gpx/:id/data" => "traces#data", :as => :api_trace_data + end + namespace :api, :path => "api/0.6" do # Map notes API - resources :notes, :except => [:new, :edit, :update], :constraints => { :id => /\d+/ }, :controller => "notes", :as => :api_notes do + resources :notes, :except => [:new, :edit, :update], :id => /\d+/, :controller => "notes" do collection do get "search" get "feed", :defaults => { :format => "rss" } @@ -99,7 +110,7 @@ OpenStreetMap::Application.routes.draw do end end - resources :user_blocks, :only => [:show], :constraints => { :id => /\d+/ }, :controller => "user_blocks", :as => :api_user_blocks + resources :user_blocks, :only => :show, :id => /\d+/, :controller => "user_blocks" end # Data browsing