X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/52a6df0548124a0dbb7fe8b5afa3ef5271327cf1..e48cbc6a5f54a0e18dc581ccbac3b13284313125:/config/routes.rb diff --git a/config/routes.rb b/config/routes.rb index 0a0396251..9196fae1b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,10 @@ ActionController::Routing::Routes.draw do |map| # API + map.connect "api/#{API_VERSION}/changeset/create", :controller => 'changeset', :action => 'create' + map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'read' + map.connect "api/#{API_VERSION}/changeset/upload", :controller => 'changeset', :action => 'upload' + map.connect "api/#{API_VERSION}/node/create", :controller => 'node', :action => 'create' map.connect "api/#{API_VERSION}/node/:id/ways", :controller => 'way', :action => 'ways_for_node', :id => /\d+/ map.connect "api/#{API_VERSION}/node/:id/relations", :controller => 'relation', :action => 'relations_for_node', :id => /\d+/ @@ -42,7 +46,10 @@ ActionController::Routing::Routes.draw do |map| map.connect "api/#{API_VERSION}/user/details", :controller => 'user', :action => 'api_details' map.connect "api/#{API_VERSION}/user/preferences", :controller => 'user_preference', :action => 'read', :conditions => { :method => :get } + map.connect "api/#{API_VERSION}/user/preferences/:preference_key", :controller => 'user_preference', :action => 'read_one', :conditions => { :method => :get } map.connect "api/#{API_VERSION}/user/preferences", :controller => 'user_preference', :action => 'update', :conditions => { :method => :put } + map.connect "api/#{API_VERSION}/user/preferences/:preference_key", :controller => 'user_preference', :action => 'update_one', :conditions => { :method => :put } + map.connect "api/#{API_VERSION}/user/preferences/:preference_key", :controller => 'user_preference', :action => 'delete_one', :conditions => { :method => :delete } map.connect "api/#{API_VERSION}/user/gpx_files", :controller => 'user', :action => 'api_gpx_files' map.connect "api/#{API_VERSION}/gpx/create", :controller => 'trace', :action => 'api_create' @@ -141,6 +148,7 @@ ActionController::Routing::Routes.draw do |map| map.connect '/message/read/:message_id', :controller => 'message', :action => 'read' map.connect '/message/mark/:message_id', :controller => 'message', :action => 'mark' map.connect '/message/reply/:message_id', :controller => 'message', :action => 'reply' + map.connect '/message/delete/:message_id', :controller => 'message', :action => 'destroy' # fall through map.connect ':controller/:id/:action'