X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/e932972a4a3683bbebc99659f9fb8739beb4eba3..2a6f78747e2013a1e606f9bc08b39f9c392d154a:/config/routes.rb diff --git a/config/routes.rb b/config/routes.rb index 415f8a01b..2b67e360e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,6 +5,8 @@ OpenStreetMap::Application.routes.draw do :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 @@ -102,6 +104,8 @@ OpenStreetMap::Application.routes.draw do 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 @@ -168,8 +172,12 @@ OpenStreetMap::Application.routes.draw do 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 => "/")