X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/1f8a68371ad34594cce4aadf5fef229588fd4ddc..1d8e66016c4cdf465d06198cfbbfe76613ed3bfc:/config/routes.rb diff --git a/config/routes.rb b/config/routes.rb index fcf22bced..6dd3860dc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,7 +2,8 @@ ActionController::Routing::Routes.draw do |map| # API map.connect "api/capabilities", :controller => 'api', :action => 'capabilities' - + map.connect "api/#{API_VERSION}/capabilities", :controller => 'api', :action => 'capabilities' + map.connect "api/#{API_VERSION}/changeset/create", :controller => 'changeset', :action => 'create' map.connect "api/#{API_VERSION}/changeset/:id/upload", :controller => 'changeset', :action => 'upload', :id => /\d+/ map.connect "api/#{API_VERSION}/changeset/:id/download", :controller => 'changeset', :action => 'download', :id => /\d+/ @@ -36,6 +37,7 @@ ActionController::Routing::Routes.draw do |map| map.connect "api/#{API_VERSION}/relation/:id/relations", :controller => 'relation', :action => 'relations_for_relation', :id => /\d+/ map.connect "api/#{API_VERSION}/relation/:id/history", :controller => 'old_relation', :action => 'history', :id => /\d+/ map.connect "api/#{API_VERSION}/relation/:id/full", :controller => 'relation', :action => 'full', :id => /\d+/ + map.connect "api/#{API_VERSION}/relation/:id/:version", :controller => 'old_relation', :action => 'version', :id => /\d+/, :version => /\d+/ map.connect "api/#{API_VERSION}/relation/:id", :controller => 'relation', :action => 'read', :id => /\d+/, :conditions => { :method => :get } map.connect "api/#{API_VERSION}/relation/:id", :controller => 'relation', :action => 'update', :id => /\d+/, :conditions => { :method => :put } map.connect "api/#{API_VERSION}/relation/:id", :controller => 'relation', :action => 'delete', :id => /\d+/, :conditions => { :method => :delete } @@ -83,6 +85,7 @@ ActionController::Routing::Routes.draw do |map| map.connect '/browse/changesets', :controller => 'changeset', :action => 'list' # web site + map.root :controller => 'site', :action => 'index' map.connect '/', :controller => 'site', :action => 'index' map.connect '/edit', :controller => 'site', :action => 'edit' map.connect '/history', :controller => 'changeset', :action => 'list_bbox' @@ -90,6 +93,7 @@ ActionController::Routing::Routes.draw do |map| map.connect '/login', :controller => 'user', :action => 'login' map.connect '/logout', :controller => 'user', :action => 'logout' map.connect '/offline', :controller => 'site', :action => 'offline' + map.connect '/key', :controller => 'site', :action => 'key' map.connect '/user/new', :controller => 'user', :action => 'new' map.connect '/user/save', :controller => 'user', :action => 'save' map.connect '/user/confirm', :controller => 'user', :action => 'confirm' @@ -110,6 +114,9 @@ ActionController::Routing::Routes.draw do |map| map.connect '/create-account.html', :controller => 'user', :action => 'new' map.connect '/forgot-password.html', :controller => 'user', :action => 'lost_password' + # permalink + map.connect '/go/:code', :controller => 'site', :action => 'permalink', :code => /[a-zA-Z0-9_@]+=*/ + # traces map.connect '/traces', :controller => 'trace', :action => 'list' map.connect '/traces/page/:page', :controller => 'trace', :action => 'list' @@ -172,7 +179,7 @@ ActionController::Routing::Routes.draw do |map| map.connect '/user/:display_name/inbox', :controller => 'message', :action => 'inbox' map.connect '/user/:display_name/outbox', :controller => 'message', :action => 'outbox' - map.connect '/message/new/:user_id', :controller => 'message', :action => 'new' + map.connect '/message/new/:display_name', :controller => 'message', :action => 'new' 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'