2015-11-08 09:02:13 +00:00
|
|
|
Ensl::Application.routes.draw do
|
2020-03-26 18:50:45 +00:00
|
|
|
if Rails.env.production?
|
2020-03-15 18:31:46 +00:00
|
|
|
%w(403 404 422 500).each do |code|
|
|
|
|
get code, to: "errors#show", code: code
|
|
|
|
end
|
2014-04-26 17:47:17 +00:00
|
|
|
end
|
|
|
|
|
2014-08-28 20:43:11 +00:00
|
|
|
namespace :api do
|
|
|
|
namespace :v1 do
|
|
|
|
resources :users, only: [:show, :index]
|
2016-04-16 23:05:18 +00:00
|
|
|
resources :teams, only: [:show]
|
2015-08-01 15:20:49 +00:00
|
|
|
resources :servers, only: [:index]
|
2015-08-01 15:34:01 +00:00
|
|
|
resources :maps, only: [:index]
|
2014-08-28 20:43:11 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-08-01 15:20:49 +00:00
|
|
|
root to: "articles#news_index"
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2015-08-01 15:20:49 +00:00
|
|
|
resources :articles do
|
|
|
|
resources :versions
|
|
|
|
end
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'contests/del_map'
|
|
|
|
get 'contests/scores'
|
|
|
|
get 'contests/historical', to: "contests#historical"
|
2014-04-25 22:15:15 +00:00
|
|
|
|
2015-08-01 15:20:49 +00:00
|
|
|
resources :contests do
|
2015-11-08 09:02:13 +00:00
|
|
|
get "current", on: :collection
|
2015-08-01 15:20:49 +00:00
|
|
|
end
|
2014-03-23 00:22:25 +00:00
|
|
|
|
|
|
|
resources :log_events
|
2015-08-01 15:20:49 +00:00
|
|
|
resources :categories
|
|
|
|
resources :options
|
|
|
|
resources :polls
|
2020-03-21 20:33:44 +00:00
|
|
|
resources :custom_urls, only: [:create, :update, :destroy]
|
|
|
|
resources :brackets
|
2014-04-12 01:35:42 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'comments/quote'
|
2014-04-12 01:35:42 +00:00
|
|
|
|
2015-08-01 15:20:49 +00:00
|
|
|
resources :comments
|
2020-03-16 02:35:44 +00:00
|
|
|
resources :shoutmsgs
|
2015-08-01 15:20:49 +00:00
|
|
|
resources :teamers
|
|
|
|
resources :teams
|
2020-04-03 06:48:32 +00:00
|
|
|
resources :gathers do |g|
|
|
|
|
collection do
|
|
|
|
get :refresh
|
|
|
|
end
|
|
|
|
member do
|
|
|
|
post :pick
|
|
|
|
end
|
|
|
|
end
|
|
|
|
get 'gathers/latest/:game', to: "gathers#latest", via: :get
|
|
|
|
get 'gather', to: "gathers#latest", game: "ns2", via: :get
|
|
|
|
|
|
|
|
get 'gatherers/:id/status', to: "gatherers#status", via: :post
|
|
|
|
|
2015-08-01 15:20:49 +00:00
|
|
|
resources :gatherers
|
|
|
|
resources :groups
|
|
|
|
resources :groupers
|
|
|
|
resources :forumers
|
|
|
|
resources :topics
|
2018-11-22 23:01:40 +00:00
|
|
|
resources :matches
|
2014-04-12 01:35:42 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'forums/up'
|
|
|
|
get 'forums/down'
|
2014-04-12 01:35:42 +00:00
|
|
|
|
2015-08-01 15:20:49 +00:00
|
|
|
resources :forums
|
2020-03-21 20:33:44 +00:00
|
|
|
resources :users do
|
|
|
|
collection do
|
|
|
|
get 'forgot'
|
|
|
|
post 'forgot'
|
|
|
|
end
|
|
|
|
end
|
2015-08-01 15:20:49 +00:00
|
|
|
resources :locks
|
2020-03-30 00:26:32 +00:00
|
|
|
resources :contesters
|
|
|
|
|
|
|
|
get "contests/:id/confirmedmatches" => "contests#confirmed_matches", as: :confirmed_matches
|
|
|
|
resources :contests do
|
|
|
|
member do
|
2020-03-29 23:17:34 +00:00
|
|
|
get :recalc
|
|
|
|
end
|
|
|
|
end
|
2015-08-01 15:20:49 +00:00
|
|
|
resources :challenges
|
|
|
|
resources :servers
|
|
|
|
resources :predictions
|
|
|
|
resources :rounds
|
2020-03-15 22:58:22 +00:00
|
|
|
resources :matches do |m|
|
2020-03-25 23:33:40 +00:00
|
|
|
member do
|
|
|
|
get :ref
|
|
|
|
end
|
|
|
|
collection do
|
|
|
|
get :admin
|
|
|
|
end
|
2020-03-15 22:58:22 +00:00
|
|
|
resources :match_proposals, path: "proposals", as: :proposals, only: [:index, :new, :create, :update]
|
2014-05-10 08:44:48 +00:00
|
|
|
end
|
2014-05-19 20:16:46 +00:00
|
|
|
|
2015-08-01 15:20:49 +00:00
|
|
|
resources :maps
|
|
|
|
resources :logs
|
|
|
|
resources :log_files
|
2020-04-01 02:00:53 +00:00
|
|
|
resources :directories do
|
|
|
|
member do
|
|
|
|
get :recreate
|
|
|
|
end
|
|
|
|
end
|
2014-03-23 00:22:25 +00:00
|
|
|
resources :data_files
|
2015-08-01 15:20:49 +00:00
|
|
|
resources :predictions
|
|
|
|
resources :weeks
|
|
|
|
resources :movies
|
|
|
|
resources :messages
|
2017-11-09 19:57:05 +00:00
|
|
|
# resources :sites
|
2015-08-01 15:20:49 +00:00
|
|
|
resources :bans
|
|
|
|
resources :tweets
|
|
|
|
resources :issues
|
2020-03-15 22:58:22 +00:00
|
|
|
resources :posts do |p|
|
|
|
|
get :quote
|
|
|
|
end
|
2015-11-08 09:02:13 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'about/action'
|
|
|
|
get 'about/staff'
|
2020-03-15 07:53:52 +00:00
|
|
|
get 'about/adminpanel'
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'about/statistics'
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'refresh', to: "application#refresh"
|
|
|
|
get 'search', to: "application#search"
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'news', to: "articles#news_index"
|
|
|
|
get 'news/archive', to: "articles#news_archive"
|
|
|
|
get 'news/admin', to: "articles#admin"
|
|
|
|
get 'articles/cleanup'
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'data_files/admin'
|
|
|
|
get 'data_files/addFile'
|
|
|
|
get 'data_files/delFile'
|
|
|
|
get 'data_files/trash'
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'directories', to: "directories#show", id: 1
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'groups/addUser'
|
|
|
|
get 'groups/delUser'
|
2015-06-15 22:16:44 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'movies/download'
|
|
|
|
get 'movies/preview'
|
|
|
|
get 'movies/snapshot'
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'plugin/user'
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'users/forgot'
|
|
|
|
get 'users/recover'
|
|
|
|
get 'users/agenda'
|
2015-08-23 12:24:19 +00:00
|
|
|
post 'users/logout'
|
|
|
|
post 'users/login'
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'users/agenda'
|
|
|
|
get 'users/login'
|
|
|
|
get 'users/logout'
|
|
|
|
get 'users/popup'
|
2017-11-09 17:25:52 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'votes/create'
|
2020-03-15 22:58:22 +00:00
|
|
|
get "polls/showvotes/:id", to: "polls#showvotes", as: "polls_showvotes"
|
|
|
|
|
|
|
|
get "custom_urls", to: "custom_urls#administrate"
|
2020-03-22 17:43:59 +00:00
|
|
|
get ":name", to: "custom_urls#show", requirements: {name: /\A[a-z\-]{2,10}\Z/}
|
2017-11-09 17:25:52 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get ':controller/:action', requirements: { action: /A-Za-z/ }
|
|
|
|
get ':controller/:action/:id'
|
|
|
|
get ':controller/:action/:id.:format'
|
|
|
|
get ':controller/:action/:id/:id2'
|
2014-05-19 20:16:46 +00:00
|
|
|
|
2015-08-15 19:26:42 +00:00
|
|
|
get 'teamers/replace', to: 'teamers#replace', as: 'teamers_replace'
|
2014-03-23 00:22:25 +00:00
|
|
|
end
|