]> git.openstreetmap.org Git - rails.git/blob - config/routes.rb
33a6dc13adce465bc62060b66f6bb23f7803df05
[rails.git] / config / routes.rb
1 ActionController::Routing::Routes.draw do |map|
2
3   # API
4   API_VERSION = '0.4' # change this in envronment.rb too
5   map.connect "api/#{API_VERSION}/node/create", :controller => 'node', :action => 'create'
6   map.connect "api/#{API_VERSION}/node/:id/history", :controller => 'old_node', :action => 'history', :id => nil
7   map.connect "api/#{API_VERSION}/node/:id", :controller => 'node', :action => 'rest', :id => nil
8
9   map.connect "api/#{API_VERSION}/segment/create", :controller => 'segment', :action => 'create'
10   map.connect "api/#{API_VERSION}/segment/:id/history", :controller => 'old_segment', :action => 'history'
11   map.connect "api/#{API_VERSION}/segment/:id", :controller => 'segment', :action => 'rest'
12
13   map.connect "api/#{API_VERSION}/way/create", :controller => 'way', :action => 'create'
14   map.connect "api/#{API_VERSION}/way/:id/history", :controller => 'old_way', :action => 'history', :id => nil
15   map.connect "api/#{API_VERSION}/way/:id", :controller => 'way', :action => 'rest', :id => nil
16
17   map.connect "api/#{API_VERSION}/map", :controller => 'api', :action => 'map'
18   
19   # web site
20
21   map.connect '/', :controller => 'site', :action => 'index'
22   map.connect '/index.html', :controller => 'site', :action => 'index'
23   map.connect '/edit.html', :controller => 'site', :action => 'edit'
24   map.connect '/login.html', :controller => 'user', :action => 'login'
25   map.connect '/logout.html', :controller => 'user', :action => 'logout'
26   map.connect '/create-account.html', :controller => 'user', :action => 'new'
27   map.connect '/forgot-password.html', :controller => 'user', :action => 'lost_password'
28   
29   map.connect '/traces', :controller => 'trace', :action => 'list'
30   map.connect '/traces/mine', :controller => 'trace', :action => 'mine'
31   map.connect '/traces/user/:user/:id', :controller => 'trace', :action => 'list', :id => nil
32
33   map.connect ':controller/:action/:id'
34 end