+ root :to => "site#index", :via => [:get, :post]
+ get "/edit" => "site#edit"
+ get "/copyright/:copyright_locale" => "site#copyright"
+ get "/copyright" => "site#copyright"
+ get "/welcome" => "site#welcome"
+ get "/fixthemap" => "site#fixthemap"
+ get "/help" => "site#help"
+ get "/about/:about_locale" => "site#about"
+ get "/about" => "site#about"
+ get "/communities" => "site#communities"
+ get "/history" => "changesets#index"
+ get "/history/feed" => "changesets#feed", :defaults => { :format => :atom }
+ scope "/history" do
+ namespace :changeset_comments, :path => :comments, :as => :changesets_comments do
+ resource :feed, :only => :show, :defaults => { :format => "rss" }
+ end
+ end
+ get "/export" => "site#export"
+ get "/login" => "sessions#new"
+ post "/login" => "sessions#create"
+ match "/logout" => "sessions#destroy", :via => [:get, :post]
+ get "/offline" => "site#offline"
+ get "/key" => "site#key"
+ get "/id" => "site#id"
+ get "/query" => "browse#query"
+ get "/user/new" => "users#new"
+ post "/user/new" => "users#create"
+ get "/user/terms" => "users#terms"
+ post "/user/save" => "users#save"
+ get "/user/:display_name/confirm/resend" => "confirmations#confirm_resend", :as => :user_confirm_resend
+ match "/user/:display_name/confirm" => "confirmations#confirm", :via => [:get, :post]
+ match "/user/confirm" => "confirmations#confirm", :via => [:get, :post]
+ match "/user/confirm-email" => "confirmations#confirm_email", :via => [:get, :post]
+ post "/user/go_public" => "users#go_public"
+ scope :user, :as => "user" do
+ get "forgot-password" => "passwords#new"
+ post "forgot-password" => "passwords#create"
+ get "reset-password" => "passwords#edit"
+ post "reset-password" => "passwords#update"
+ end
+ get "/user/suspended" => "users#suspended"
+
+ get "/index.html", :to => redirect(:path => "/")
+ get "/create-account.html", :to => redirect(:path => "/user/new")
+ get "/forgot-password.html", :to => redirect(:path => "/user/forgot-password")
+
+ # omniauth
+ get "/auth/failure" => "users#auth_failure"
+ match "/auth/:provider/callback" => "users#auth_success", :via => [:get, :post], :as => :auth_success
+ match "/auth/:provider" => "users#auth", :via => [:post, :patch], :as => :auth
+
+ # permalink
+ get "/go/:code" => "site#permalink", :code => /[a-zA-Z0-9_@~]+[=-]*/, :as => :permalink
+
+ # rich text preview
+ post "/preview/:type" => "site#preview", :as => :preview
+
+ # traces
+ resources :traces, :except => [:show]
+ get "/user/:display_name/traces/tag/:tag/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/user/%{display_name}/traces/tag/%{tag}")
+ get "/user/:display_name/traces/tag/:tag" => "traces#index"
+ get "/user/:display_name/traces/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/user/%{display_name}/traces")
+ get "/user/:display_name/traces" => "traces#index"
+ get "/user/:display_name/traces/tag/:tag/rss" => "traces#georss", :defaults => { :format => :rss }
+ get "/user/:display_name/traces/rss" => "traces#georss", :defaults => { :format => :rss }
+ get "/user/:display_name/traces/:id" => "traces#show", :as => "show_trace"
+ scope "/user/:display_name/traces/:trace_id", :module => :traces do
+ get "picture" => "pictures#show", :as => "trace_picture"
+ get "icon" => "icons#show", :as => "trace_icon"
+ end
+ get "/traces/tag/:tag/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/traces/tag/%{tag}")
+ get "/traces/tag/:tag" => "traces#index"
+ get "/traces/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/traces")
+ get "/traces/tag/:tag/rss" => "traces#georss", :defaults => { :format => :rss }
+ get "/traces/rss" => "traces#georss", :defaults => { :format => :rss }
+ get "/traces/mine/tag/:tag/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/traces/mine/tag/%{tag}")
+ get "/traces/mine/tag/:tag" => "traces#mine"
+ get "/traces/mine/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/traces/mine")
+ get "/traces/mine" => "traces#mine"
+ get "/trace/create", :to => redirect(:path => "/traces/new")
+ get "/trace/:id/data" => "traces#data", :id => /\d+/, :as => "trace_data"
+ get "/trace/:id/edit", :to => redirect(:path => "/traces/%{id}/edit")
+
+ # diary pages
+ resources :diary_entries, :path => "diary", :only => [:new, :create, :index] do
+ collection do
+ get "friends" => "diary_entries#index", :friends => true
+ get "nearby" => "diary_entries#index", :nearby => true
+ end
+ end
+ get "/user/:display_name/diary/rss" => "diary_entries#rss", :defaults => { :format => :rss }
+ get "/diary/:language/rss" => "diary_entries#rss", :defaults => { :format => :rss }
+ get "/diary/rss" => "diary_entries#rss", :defaults => { :format => :rss }
+ get "/user/:display_name/diary/comments/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/user/%{display_name}/diary/comments")
+ get "/user/:display_name/diary/comments" => "diary_comments#index", :as => :diary_comments
+ get "/user/:display_name/diary" => "diary_entries#index"
+ get "/diary/:language" => "diary_entries#index"
+ scope "/user/:display_name" do
+ resources :diary_entries, :path => "diary", :only => [:edit, :update, :show], :id => /\d+/ do
+ member do
+ post :hide, :unhide
+ end
+ end
+ end
+ match "/user/:display_name/diary/:id/subscribe" => "diary_entries#subscribe", :via => [:get, :post], :as => :diary_entry_subscribe, :id => /\d+/
+ match "/user/:display_name/diary/:id/unsubscribe" => "diary_entries#unsubscribe", :via => [:get, :post], :as => :diary_entry_unsubscribe, :id => /\d+/
+ post "/user/:display_name/diary/:id/comments" => "diary_comments#create", :id => /\d+/, :as => :comment_diary_entry
+ post "/diary_comments/:comment/hide" => "diary_comments#hide", :comment => /\d+/, :as => :hide_diary_comment
+ post "/diary_comments/:comment/unhide" => "diary_comments#unhide", :comment => /\d+/, :as => :unhide_diary_comment
+
+ # user pages
+ resources :users, :path => "user", :param => :display_name, :only => [:show, :destroy] do
+ resource :role, :controller => "user_roles", :path => "roles/:role", :only => [:create, :destroy]
+ end
+ get "/user/:display_name/account", :to => redirect(:path => "/account/edit")
+ post "/user/:display_name/set_status" => "users#set_status", :as => :set_status_user
+
+ resource :account, :only => [:edit, :update, :destroy]
+
+ namespace :account do
+ resource :deletion, :only => [:show]
+ end
+ resource :dashboard, :only => [:show]
+ resource :preferences, :only => [:show, :edit, :update]
+ resource :profile, :only => [:edit, :update]
+
+ # friendships
+ match "/user/:display_name/make_friend" => "friendships#make_friend", :via => [:get, :post], :as => "make_friend"
+ match "/user/:display_name/remove_friend" => "friendships#remove_friend", :via => [:get, :post], :as => "remove_friend"
+
+ # user lists
+ match "/users" => "users#index", :via => [:get, :post]
+ match "/users/:status" => "users#index", :via => [:get, :post]
+
+ # geocoder
+ get "/search" => "geocoder#search"
+ post "/geocoder/search_latlon" => "geocoder#search_latlon"
+ post "/geocoder/search_osm_nominatim" => "geocoder#search_osm_nominatim"
+ post "/geocoder/search_osm_nominatim_reverse" => "geocoder#search_osm_nominatim_reverse"
+
+ # directions
+ get "/directions" => "directions#search"
+
+ # export
+ post "/export/finish" => "export#finish"
+ get "/export/embed" => "export#embed"
+
+ # messages
+ resources :messages, :only => [:create, :show, :destroy] do
+ post :mark
+ patch :unmute
+
+ match :reply, :via => [:get, :post]
+ collection do
+ get :inbox
+ get :muted
+ get :outbox
+ end
+ end
+ get "/user/:display_name/inbox", :to => redirect(:path => "/messages/inbox")
+ get "/user/:display_name/outbox", :to => redirect(:path => "/messages/outbox")
+ get "/message/new/:display_name" => "messages#new", :as => "new_message"
+ get "/message/read/:message_id", :to => redirect(:path => "/messages/%{message_id}")
+
+ # muting users
+ scope "/user/:display_name" do
+ resource :user_mute, :only => [:create, :destroy], :path => "mute"
+ end
+ resources :user_mutes, :only => [:index]
+
+ # banning pages
+ get "/user/:display_name/blocks" => "user_blocks#blocks_on", :as => "user_blocks_on"
+ get "/user/:display_name/blocks_by" => "user_blocks#blocks_by", :as => "user_blocks_by"
+ get "/blocks/new/:display_name" => "user_blocks#new", :as => "new_user_block"
+ resources :user_blocks, :except => :new
+ match "/user/:display_name/blocks/revoke_all" => "user_blocks#revoke_all", :via => [:get, :post], :as => "revoke_all_user_blocks"
+
+ # issues and reports
+ resources :issues do
+ resources :comments, :controller => :issue_comments
+ member do
+ post "resolve"
+ post "assign"
+ post "ignore"
+ post "reopen"
+ end
+ end
+
+ resources :reports
+
+ # redactions
+ resources :redactions