X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/dc2a2c8ebd1a11e4a64555fda22c6859a51defff..886dc00ad42fd1af819bbf399f9e939fd34702df:/config/routes.rb diff --git a/config/routes.rb b/config/routes.rb index c9563f8d4..085d67417 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -120,8 +120,8 @@ OpenStreetMap::Application.routes.draw do match "/user/:display_name/history" => "changeset#list", :via => :get match "/user/:display_name/history/feed" => "changeset#feed", :via => :get, :defaults => { :format => :atom } match "/user/:display_name/notes" => "notes#mine", :via => :get - match "/history/friends" => "changeset#list", :via => :get, :friends => true, :as => "friend_changesets" - match "/history/nearby" => "changeset#list", :via => :get, :nearby => true, :as => "nearby_changesets" + match "/history/friends" => "changeset#list", :via => :get, :friends => true, :as => "friend_changesets", :defaults => { :format => :html } + match "/history/nearby" => "changeset#list", :via => :get, :nearby => true, :as => "nearby_changesets", :defaults => { :format => :html } get "/browse/way/:id", :to => redirect(:path => "/way/%{id}") get "/browse/way/:id/history", :to => redirect(:path => "/way/%{id}/history") @@ -175,6 +175,11 @@ OpenStreetMap::Application.routes.draw do get "/create-account.html", :to => redirect(:path => "/user/new") get "/forgot-password.html", :to => redirect(:path => "/user/forgot-password") + # omniauth + match "/auth/failure" => "user#auth_failure", :via => :get + match "/auth/:provider/callback" => "user#auth_success", :via => [:get, :post], :as => :auth_success + match "/auth/:provider" => "user#auth", :via => [:get, :post], :as => :auth + # permalink match "/go/:code" => "site#permalink", :via => :get, :code => /[a-zA-Z0-9_@~]+[=-]*/ @@ -182,22 +187,22 @@ OpenStreetMap::Application.routes.draw do match "/preview/:format" => "site#preview", :via => :post, :as => :preview # traces - match "/user/:display_name/traces/tag/:tag/page/:page" => "trace#list", :via => :get + match "/user/:display_name/traces/tag/:tag/page/:page" => "trace#list", :via => :get, :page => /[1-9][0-9]*/ match "/user/:display_name/traces/tag/:tag" => "trace#list", :via => :get - match "/user/:display_name/traces/page/:page" => "trace#list", :via => :get + match "/user/:display_name/traces/page/:page" => "trace#list", :via => :get, :page => /[1-9][0-9]*/ match "/user/:display_name/traces" => "trace#list", :via => :get match "/user/:display_name/traces/tag/:tag/rss" => "trace#georss", :via => :get, :defaults => { :format => :rss } match "/user/:display_name/traces/rss" => "trace#georss", :via => :get, :defaults => { :format => :rss } match "/user/:display_name/traces/:id" => "trace#view", :via => :get match "/user/:display_name/traces/:id/picture" => "trace#picture", :via => :get match "/user/:display_name/traces/:id/icon" => "trace#icon", :via => :get - match "/traces/tag/:tag/page/:page" => "trace#list", :via => :get + match "/traces/tag/:tag/page/:page" => "trace#list", :via => :get, :page => /[1-9][0-9]*/ match "/traces/tag/:tag" => "trace#list", :via => :get - match "/traces/page/:page" => "trace#list", :via => :get + match "/traces/page/:page" => "trace#list", :via => :get, :page => /[1-9][0-9]*/ match "/traces" => "trace#list", :via => :get match "/traces/tag/:tag/rss" => "trace#georss", :via => :get, :defaults => { :format => :rss } match "/traces/rss" => "trace#georss", :via => :get, :defaults => { :format => :rss } - match "/traces/mine/tag/:tag/page/:page" => "trace#mine", :via => :get + match "/traces/mine/tag/:tag/page/:page" => "trace#mine", :via => :get, :page => /[1-9][0-9]*/ match "/traces/mine/tag/:tag" => "trace#mine", :via => :get match "/traces/mine/page/:page" => "trace#mine", :via => :get match "/traces/mine" => "trace#mine", :via => :get @@ -213,7 +218,7 @@ OpenStreetMap::Application.routes.draw do match "/user/:display_name/diary/rss" => "diary_entry#rss", :via => :get, :defaults => { :format => :rss } match "/diary/:language/rss" => "diary_entry#rss", :via => :get, :defaults => { :format => :rss } match "/diary/rss" => "diary_entry#rss", :via => :get, :defaults => { :format => :rss } - match "/user/:display_name/diary/comments/:page" => "diary_entry#comments", :via => :get, :page => /\d+/ + match "/user/:display_name/diary/comments/:page" => "diary_entry#comments", :via => :get, :page => /[1-9][0-9]*/ match "/user/:display_name/diary/comments/" => "diary_entry#comments", :via => :get match "/user/:display_name/diary" => "diary_entry#list", :via => :get match "/diary/:language" => "diary_entry#list", :via => :get