:authorized_applications => "oauth2_authorized_applications"
end
+ use_doorkeeper_openid_connect :scope => "oauth2" if Settings.key?(:doorkeeper_signing_key)
+
# API
namespace :api do
get "capabilities" => "capabilities#show" # Deprecated, remove when 0.6 support is removed
post "notes/editPOIexec" => "api/notes#comment"
get "notes/getGPX" => "api/notes#index", :format => "gpx"
get "notes/getRSSfeed" => "api/notes#feed", :format => "rss"
+
+ resources :user_blocks, :only => [:show], :constraints => { :id => /\d+/ }, :controller => "api/user_blocks", :as => :api_user_blocks
end
# Data browsing
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"
- match "/user/reset-password" => "passwords#reset_password", :via => [:get, :post], :as => :user_reset_password
- match "/user/forgot-password" => "passwords#lost_password", :via => [:get, :post], :as => :user_forgot_password
+ 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 => "/")
# traces
resources :traces, :except => [:show]
- get "/user/:display_name/traces/tag/:tag/page/:page" => "traces#index", :page => /[1-9][0-9]*/
+ 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" => "traces#index", :page => /[1-9][0-9]*/
+ 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"
get "/user/:display_name/traces/:id/picture" => "traces#picture", :as => "trace_picture"
get "/user/:display_name/traces/:id/icon" => "traces#icon", :as => "trace_icon"
- get "/traces/tag/:tag/page/:page" => "traces#index", :page => /[1-9][0-9]*/
+ 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" => "traces#index", :page => /[1-9][0-9]*/
+ 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" => "traces#mine", :page => /[1-9][0-9]*/
+ 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" => "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"
# geocoder
get "/search" => "geocoder#search"
- get "/geocoder/search_latlon" => "geocoder#search_latlon"
- get "/geocoder/search_osm_nominatim" => "geocoder#search_osm_nominatim"
- get "/geocoder/search_osm_nominatim_reverse" => "geocoder#search_osm_nominatim_reverse"
+ 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"