X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7fef0353f25ecb02d400987ec30763d1ce881a12..a20e28809f5ca1e3f3579faeaf118fff3ecc4994:/config/routes.rb diff --git a/config/routes.rb b/config/routes.rb index f5b7e4e72..8160c878c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -184,31 +184,31 @@ OpenStreetMap::Application.routes.draw do match "/go/:code" => "site#permalink", :via => :get, :code => /[a-zA-Z0-9_@~]+[=-]*/ # rich text preview - match "/preview/:format" => "site#preview", :via => :post, :as => :preview + match "/preview/:type" => "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 match "/trace/create" => "trace#create", :via => [:get, :post] match "/trace/:id/data" => "trace#data", :via => :get, :id => /\d+/, :as => "trace_data" - match "/trace/:id/edit" => "trace#edit", :via => [:get, :post, :patch], :id => /\d+/, :as => "trace_edit" + match "/trace/:id/edit" => "trace#edit", :via => [:get, :post], :id => /\d+/, :as => "trace_edit" match "/trace/:id/delete" => "trace#delete", :via => :post, :id => /\d+/ # diary pages @@ -218,16 +218,18 @@ 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 match "/diary" => "diary_entry#list", :via => :get - match "/user/:display_name/diary/:id" => "diary_entry#view", :via => :get, :id => /\d+/ + match "/user/:display_name/diary/:id" => "diary_entry#view", :via => :get, :id => /\d+/, :as => :diary_entry match "/user/:display_name/diary/:id/newcomment" => "diary_entry#comment", :via => :post, :id => /\d+/ match "/user/:display_name/diary/:id/edit" => "diary_entry#edit", :via => [:get, :post], :id => /\d+/ match "/user/:display_name/diary/:id/hide" => "diary_entry#hide", :via => :post, :id => /\d+/, :as => :hide_diary_entry match "/user/:display_name/diary/:id/hidecomment/:comment" => "diary_entry#hidecomment", :via => :post, :id => /\d+/, :comment => /\d+/, :as => :hide_diary_comment + match "/user/:display_name/diary/:id/subscribe" => "diary_entry#subscribe", :via => :post, :as => :diary_entry_subscribe, :id => /\d+/ + match "/user/:display_name/diary/:id/unsubscribe" => "diary_entry#unsubscribe", :via => :post, :as => :diary_entry_unsubscribe, :id => /\d+/ # user pages match "/user/:display_name" => "user#view", :via => :get, :as => "user" @@ -244,8 +246,6 @@ OpenStreetMap::Application.routes.draw do # geocoder match "/search" => "geocoder#search", :via => :get, :as => :search match "/geocoder/search_latlon" => "geocoder#search_latlon", :via => :get - match "/geocoder/search_us_postcode" => "geocoder#search_us_postcode", :via => :get - match "/geocoder/search_uk_postcode" => "geocoder#search_uk_postcode", :via => :get match "/geocoder/search_ca_postcode" => "geocoder#search_ca_postcode", :via => :get match "/geocoder/search_osm_nominatim" => "geocoder#search_osm_nominatim", :via => :get match "/geocoder/search_geonames" => "geocoder#search_geonames", :via => :get @@ -288,6 +288,19 @@ OpenStreetMap::Application.routes.draw do resources :user_blocks match "/blocks/:id/revoke" => "user_blocks#revoke", :via => [:get, :post], :as => "revoke_user_block" + # 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 end