1 ActionController::Routing::Routes.draw do |map|
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 => 'node', :action => 'history', :id => nil
7 map.connect "api/#{API_VERSION}/node/:id", :controller => 'node', :action => 'rest', :id => nil
9 map.connect "api/#{API_VERSION}/segment/create", :controller => 'segment', :action => 'create'
10 map.connect "api/#{API_VERSION}/segment/:id/history", :controller => 'segment', :action => 'history'
11 map.connect "api/#{API_VERSION}/segment/:id", :controller => 'segment', :action => 'rest'
13 map.connect "api/#{API_VERSION}/way/create", :controller => 'way', :action => 'create'
14 map.connect "api/#{API_VERSION}/way/:id/history", :controller => 'way', :action => 'history'
15 map.connect "api/#{API_VERSION}/way/:id", :controller => 'way', :action => 'rest'
17 map.connect "api/#{API_VERSION}/map", :controller => 'api', :action => 'map'
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'
29 map.connect '/traces', :controller => 'trace', :action => 'list'
30 map.connect '/traces/mine', :controller => 'trace', :action => 'users'
31 map.connect '/traces/user/:user/:id', :controller => 'trace', :action => 'list', :id => nil
33 map.connect ':controller/:action/:id'