2014-04-14 17:32:01 -04:00
|
|
|
Rails.application.routes.draw do
|
2017-01-27 04:54:52 -05:00
|
|
|
|
2019-02-17 05:01:12 -05:00
|
|
|
require 'sidekiq/web'
|
2019-03-28 17:04:01 -04:00
|
|
|
require 'sidekiq_unique_jobs/web'
|
2019-10-05 05:20:23 -04:00
|
|
|
|
2019-02-17 05:01:12 -05:00
|
|
|
Sidekiq::Web.set :session_secret, Rails.application.credentials[:secret_key_base]
|
2019-10-05 05:20:23 -04:00
|
|
|
mount Sidekiq::Web => '/sidekiq', constraints: AdminRouteConstraint.new
|
2019-02-17 05:01:12 -05:00
|
|
|
|
2010-03-10 18:21:43 -05:00
|
|
|
namespace :admin do
|
2019-08-23 18:05:46 -04:00
|
|
|
resources :users, :only => [:edit, :update, :edit_blacklist, :update_blacklist] do
|
|
|
|
member do
|
|
|
|
get :edit_blacklist
|
|
|
|
post :update_blacklist
|
2019-09-08 14:57:00 -04:00
|
|
|
get :request_password_reset
|
|
|
|
post :password_reset
|
2019-08-23 18:05:46 -04:00
|
|
|
end
|
|
|
|
end
|
2019-04-06 16:13:50 -04:00
|
|
|
resource :alias_and_implication_import, :only => [:new, :create]
|
|
|
|
resource :dashboard, :only => [:show]
|
2019-07-17 17:40:03 -04:00
|
|
|
resources :exceptions, only: [:index, :show]
|
2011-07-16 19:20:02 -04:00
|
|
|
end
|
2019-04-27 14:28:02 -04:00
|
|
|
resources :edit_histories
|
2011-07-16 19:20:02 -04:00
|
|
|
namespace :moderator do
|
|
|
|
resource :dashboard, :only => [:show]
|
|
|
|
resources :ip_addrs, :only => [:index] do
|
|
|
|
collection do
|
|
|
|
get :search
|
|
|
|
end
|
|
|
|
end
|
2011-07-29 19:42:25 -04:00
|
|
|
resources :invitations, :only => [:new, :create, :index]
|
2011-08-03 18:32:57 -04:00
|
|
|
resource :tag, :only => [:edit, :update]
|
2011-07-22 13:35:40 -04:00
|
|
|
namespace :post do
|
2016-09-08 18:52:48 -04:00
|
|
|
resource :queue, :only => [:show] do
|
|
|
|
member do
|
|
|
|
get :random
|
|
|
|
end
|
|
|
|
end
|
2019-07-19 21:05:43 -04:00
|
|
|
resource :approval, :only => [:create, :destroy]
|
2019-01-22 20:04:52 -05:00
|
|
|
resources :disapprovals, :only => [:create, :index]
|
2013-04-08 13:44:43 -04:00
|
|
|
resources :posts, :only => [:delete, :undelete, :expunge, :confirm_delete] do
|
2011-07-22 13:35:40 -04:00
|
|
|
member do
|
2013-02-23 16:53:03 -05:00
|
|
|
get :confirm_delete
|
2013-04-08 13:44:43 -04:00
|
|
|
post :expunge
|
2011-07-22 13:35:40 -04:00
|
|
|
post :delete
|
|
|
|
post :undelete
|
2015-07-07 11:08:32 -04:00
|
|
|
get :confirm_move_favorites
|
|
|
|
post :move_favorites
|
2013-04-16 23:23:02 -04:00
|
|
|
get :confirm_ban
|
|
|
|
post :ban
|
|
|
|
post :unban
|
2011-07-22 13:35:40 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2011-07-22 17:34:43 -04:00
|
|
|
resources :invitations, :only => [:new, :create, :index, :show]
|
|
|
|
resources :ip_addrs, :only => [:index, :search] do
|
|
|
|
collection do
|
|
|
|
get :search
|
|
|
|
end
|
|
|
|
end
|
2010-03-10 18:21:43 -05:00
|
|
|
end
|
2011-10-28 19:21:44 -04:00
|
|
|
namespace :explore do
|
2017-12-23 12:31:12 -05:00
|
|
|
resources :posts, :only => [] do
|
2011-10-28 19:21:44 -04:00
|
|
|
collection do
|
|
|
|
get :popular
|
2015-07-27 20:21:17 -04:00
|
|
|
get :searches
|
2016-02-02 19:25:14 -05:00
|
|
|
get :missed_searches
|
2013-06-17 16:15:52 -04:00
|
|
|
get :intro
|
2011-10-28 19:21:44 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
namespace :maintenance do
|
|
|
|
namespace :user do
|
2018-06-20 14:23:44 -04:00
|
|
|
resource :count_fixes, only: [:new, :create]
|
2015-09-03 20:03:03 -04:00
|
|
|
resource :email_notification, :only => [:show, :destroy]
|
2011-10-28 19:21:44 -04:00
|
|
|
resource :password_reset, :only => [:new, :create, :edit, :update]
|
|
|
|
resource :login_reminder, :only => [:new, :create]
|
2013-05-01 02:25:26 -04:00
|
|
|
resource :deletion, :only => [:show, :destroy]
|
2013-05-21 20:52:03 -04:00
|
|
|
resource :email_change, :only => [:new, :create]
|
2015-07-07 19:47:23 -04:00
|
|
|
resource :dmail_filter, :only => [:edit, :update]
|
2016-12-17 23:32:01 -05:00
|
|
|
resource :api_key, :only => [:show, :view, :update, :destroy] do
|
|
|
|
post :view
|
|
|
|
end
|
2011-10-28 19:21:44 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-03-13 17:04:59 -04:00
|
|
|
resources :tickets do
|
|
|
|
member do
|
|
|
|
post :claim
|
|
|
|
post :unclaim
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-02-23 11:45:10 -05:00
|
|
|
resources :takedowns do
|
|
|
|
collection do
|
|
|
|
post :count_matching_posts
|
|
|
|
end
|
|
|
|
member do
|
|
|
|
post :add_by_ids
|
|
|
|
post :add_by_tags
|
2019-02-27 06:47:23 -05:00
|
|
|
post :remove_by_ids
|
2019-02-23 11:45:10 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2010-03-10 18:21:43 -05:00
|
|
|
resources :artists do
|
|
|
|
member do
|
|
|
|
put :revert
|
2013-02-23 10:56:27 -05:00
|
|
|
put :ban
|
2014-03-07 19:42:20 -05:00
|
|
|
put :unban
|
2010-03-10 18:21:43 -05:00
|
|
|
end
|
2011-03-15 19:19:49 -04:00
|
|
|
collection do
|
2011-10-22 13:25:22 -04:00
|
|
|
get :show_or_new
|
2011-08-22 16:28:31 -04:00
|
|
|
get :banned
|
2011-03-15 19:19:49 -04:00
|
|
|
end
|
2010-03-10 18:21:43 -05:00
|
|
|
end
|
2018-09-15 12:40:27 -04:00
|
|
|
resources :artist_urls, only: [:index, :update]
|
2013-05-17 14:46:00 -04:00
|
|
|
resources :artist_versions, :only => [:index] do
|
|
|
|
collection do
|
|
|
|
get :search
|
|
|
|
end
|
|
|
|
end
|
2010-03-10 18:21:43 -05:00
|
|
|
resources :bans
|
2014-06-17 21:06:28 -04:00
|
|
|
resources :bulk_update_requests do
|
|
|
|
member do
|
|
|
|
post :approve
|
|
|
|
end
|
|
|
|
end
|
2011-01-21 18:07:34 -05:00
|
|
|
resources :comments do
|
2017-01-16 15:57:37 -05:00
|
|
|
resource :votes, :controller => "comment_votes", :only => [:create, :destroy]
|
2011-03-15 19:19:49 -04:00
|
|
|
collection do
|
|
|
|
get :search
|
|
|
|
end
|
2013-06-29 14:50:22 -04:00
|
|
|
member do
|
2019-09-05 08:35:27 -04:00
|
|
|
post :hide
|
|
|
|
post :unhide
|
2013-06-29 14:50:22 -04:00
|
|
|
end
|
2011-01-21 18:07:34 -05:00
|
|
|
end
|
2019-04-08 00:46:08 -04:00
|
|
|
resources :comment_votes, only: [:index, :delete, :lock] do
|
|
|
|
collection do
|
|
|
|
post :lock
|
|
|
|
post :delete
|
|
|
|
end
|
|
|
|
end
|
2017-05-05 00:23:52 -04:00
|
|
|
resources :delayed_jobs, :only => [:index, :destroy] do
|
|
|
|
member do
|
|
|
|
put :run
|
|
|
|
put :retry
|
|
|
|
put :cancel
|
|
|
|
end
|
|
|
|
end
|
2017-02-23 20:46:33 -05:00
|
|
|
resources :dmails, :only => [:new, :create, :index, :show, :destroy] do
|
2017-09-14 16:19:16 -04:00
|
|
|
member do
|
|
|
|
post :spam
|
|
|
|
post :ham
|
|
|
|
end
|
2011-10-16 01:58:16 -04:00
|
|
|
collection do
|
2013-02-20 22:52:42 -05:00
|
|
|
post :mark_all_as_read
|
2011-10-16 01:58:16 -04:00
|
|
|
end
|
|
|
|
end
|
2019-04-06 16:13:50 -04:00
|
|
|
resource :dtext_preview, :only => [:create]
|
2017-12-23 01:56:40 -05:00
|
|
|
resources :favorites, :only => [:index, :create, :destroy]
|
2011-03-12 16:09:11 -05:00
|
|
|
resources :forum_posts do
|
2018-04-16 19:09:39 -04:00
|
|
|
resource :votes, controller: "forum_post_votes"
|
2012-03-12 17:50:45 -04:00
|
|
|
member do
|
2019-09-07 06:15:50 -04:00
|
|
|
post :hide
|
|
|
|
post :unhide
|
2012-03-12 17:50:45 -04:00
|
|
|
end
|
2011-03-12 16:09:11 -05:00
|
|
|
collection do
|
|
|
|
get :search
|
|
|
|
end
|
|
|
|
end
|
2012-03-12 17:50:45 -04:00
|
|
|
resources :forum_topics do
|
|
|
|
member do
|
2019-09-07 06:15:50 -04:00
|
|
|
post :hide
|
|
|
|
post :unhide
|
2014-03-18 14:21:10 -04:00
|
|
|
get :new_merge
|
|
|
|
post :create_merge
|
2015-06-08 17:34:13 -04:00
|
|
|
post :subscribe
|
|
|
|
post :unsubscribe
|
2012-03-12 17:50:45 -04:00
|
|
|
end
|
2013-02-24 17:09:07 -05:00
|
|
|
collection do
|
|
|
|
post :mark_all_as_read
|
|
|
|
end
|
2014-07-08 13:20:01 -04:00
|
|
|
resource :visit, :controller => "forum_topic_visits"
|
2012-03-12 17:50:45 -04:00
|
|
|
end
|
2019-04-21 23:28:11 -04:00
|
|
|
resources :forum_categories
|
2019-03-27 00:55:16 -04:00
|
|
|
resources :help_pages, controller: "help", path: "help"
|
2011-10-28 19:21:44 -04:00
|
|
|
resources :ip_bans
|
2019-02-07 00:08:03 -05:00
|
|
|
resources :upload_whitelists do
|
|
|
|
collection do
|
|
|
|
get :is_allowed
|
|
|
|
end
|
|
|
|
end
|
2019-02-09 21:42:43 -05:00
|
|
|
resources :email_blacklists
|
2019-04-06 16:13:50 -04:00
|
|
|
resource :iqdb_queries, :only => [:show] do
|
2018-06-20 12:48:46 -04:00
|
|
|
collection do
|
2019-11-28 15:27:06 -05:00
|
|
|
post :show
|
2018-06-22 18:56:15 -04:00
|
|
|
get :preview
|
2018-06-20 12:48:46 -04:00
|
|
|
get :check, to: redirect {|path_params, req| "/iqdb_queries?#{req.query_string}"}
|
|
|
|
end
|
|
|
|
end
|
2011-01-14 16:45:10 -05:00
|
|
|
resources :janitor_trials do
|
2011-10-21 17:56:02 -04:00
|
|
|
collection do
|
|
|
|
get :test
|
|
|
|
end
|
2011-01-14 16:45:10 -05:00
|
|
|
member do
|
|
|
|
put :promote
|
|
|
|
put :demote
|
|
|
|
end
|
|
|
|
end
|
2011-07-22 17:34:43 -04:00
|
|
|
resources :mod_actions
|
2011-11-01 17:51:15 -04:00
|
|
|
resources :news_updates
|
2011-01-19 14:28:22 -05:00
|
|
|
resources :notes do
|
2011-05-16 09:27:06 -04:00
|
|
|
collection do
|
|
|
|
get :search
|
|
|
|
end
|
2011-01-19 14:28:22 -05:00
|
|
|
member do
|
|
|
|
put :revert
|
|
|
|
end
|
|
|
|
end
|
2011-01-21 18:07:34 -05:00
|
|
|
resources :note_versions, :only => [:index]
|
2013-05-08 08:57:50 -04:00
|
|
|
resource :note_previews, :only => [:show]
|
2010-03-10 18:21:43 -05:00
|
|
|
resources :pools do
|
|
|
|
member do
|
|
|
|
put :revert
|
2012-03-15 18:26:39 -04:00
|
|
|
post :undelete
|
2019-04-05 19:08:33 -04:00
|
|
|
get :import
|
|
|
|
get :import_preview
|
|
|
|
post :import_posts
|
2010-03-10 18:21:43 -05:00
|
|
|
end
|
2014-08-25 19:41:27 -04:00
|
|
|
collection do
|
|
|
|
get :gallery
|
|
|
|
end
|
2015-06-30 10:02:07 -04:00
|
|
|
resource :order, :only => [:edit], :controller => "pool_orders"
|
2010-03-10 18:21:43 -05:00
|
|
|
end
|
2019-04-06 16:13:50 -04:00
|
|
|
resource :pool_element, :only => [:create, :destroy] do
|
2013-03-17 21:54:28 -04:00
|
|
|
collection do
|
|
|
|
get :all_select
|
|
|
|
end
|
|
|
|
end
|
2017-02-14 19:03:19 -05:00
|
|
|
resources :pool_versions, :only => [:index] do
|
|
|
|
member do
|
|
|
|
get :diff
|
|
|
|
end
|
|
|
|
end
|
2017-12-18 18:57:05 -05:00
|
|
|
resources :post_replacements, :only => [:index, :new, :create, :update]
|
2019-04-06 16:13:50 -04:00
|
|
|
resources :posts, :only => [:index, :show, :update] do
|
2015-07-28 18:45:01 -04:00
|
|
|
resources :events, :only => [:index], :controller => "post_events"
|
2017-05-14 19:52:34 -04:00
|
|
|
resources :replacements, :only => [:index, :new, :create], :controller => "post_replacements"
|
2017-01-16 15:57:37 -05:00
|
|
|
resource :votes, :controller => "post_votes", :only => [:create, :destroy]
|
2019-08-01 19:03:13 -04:00
|
|
|
resource :flag, controller: 'post_flags', only: [:destroy]
|
2013-07-04 23:48:06 -04:00
|
|
|
collection do
|
2013-09-17 15:51:41 -04:00
|
|
|
get :random
|
2013-07-04 23:48:06 -04:00
|
|
|
end
|
2010-03-10 18:21:43 -05:00
|
|
|
member do
|
2019-09-28 03:20:37 -04:00
|
|
|
get :update_iqdb
|
2010-03-10 18:21:43 -05:00
|
|
|
put :revert
|
2013-05-18 16:25:46 -04:00
|
|
|
put :copy_notes
|
2013-02-25 12:09:02 -05:00
|
|
|
get :show_seq
|
2015-05-13 18:25:01 -04:00
|
|
|
put :mark_as_translated
|
2020-02-17 13:47:31 -05:00
|
|
|
get :comments, to: "comments#for_post"
|
2010-03-10 18:21:43 -05:00
|
|
|
end
|
2016-12-23 02:33:40 -05:00
|
|
|
get :similar, :to => "iqdb_queries#index"
|
2010-03-10 18:21:43 -05:00
|
|
|
end
|
2019-04-06 16:13:50 -04:00
|
|
|
resources :post_votes, only: [:index, :delete, :lock] do
|
|
|
|
collection do
|
|
|
|
post :lock
|
|
|
|
post :delete
|
|
|
|
end
|
|
|
|
end
|
2013-04-17 00:28:54 -04:00
|
|
|
resources :post_appeals
|
2019-08-01 19:03:13 -04:00
|
|
|
resources :post_flags, except: [:destroy]
|
2018-05-05 14:07:49 -04:00
|
|
|
resources :post_approvals, only: [:index]
|
2011-09-14 13:13:28 -04:00
|
|
|
resources :post_versions, :only => [:index, :search] do
|
2013-06-09 11:40:34 -04:00
|
|
|
member do
|
|
|
|
put :undo
|
|
|
|
end
|
2011-09-14 13:13:28 -04:00
|
|
|
collection do
|
|
|
|
get :search
|
|
|
|
end
|
|
|
|
end
|
2016-12-21 04:34:45 -05:00
|
|
|
resources :artist_commentaries, :only => [:index, :show] do
|
2013-11-19 10:37:02 -05:00
|
|
|
collection do
|
|
|
|
put :create_or_update
|
2014-03-10 22:56:38 -04:00
|
|
|
get :search
|
2013-11-19 10:37:02 -05:00
|
|
|
end
|
|
|
|
member do
|
|
|
|
put :revert
|
|
|
|
end
|
|
|
|
end
|
2016-01-03 03:02:37 -05:00
|
|
|
resource :related_tag, :only => [:show, :update]
|
2019-11-10 00:16:25 -05:00
|
|
|
match "related_tag/bulk", to: "related_tags#bulk", via: [:get, :post]
|
2018-07-21 16:24:43 -04:00
|
|
|
resource :recommended_posts, only: [:show]
|
2019-08-14 02:46:43 -04:00
|
|
|
resource :session, only: [:new, :create, :destroy] do
|
|
|
|
get :sign_out, on: :collection
|
2013-02-23 11:01:33 -05:00
|
|
|
end
|
2011-10-28 19:21:44 -04:00
|
|
|
resource :source, :only => [:show]
|
2011-03-15 19:19:49 -04:00
|
|
|
resources :tags do
|
2014-04-14 17:32:01 -04:00
|
|
|
resource :correction, :only => [:new, :create, :show], :controller => "tag_corrections"
|
2015-04-03 19:31:46 -04:00
|
|
|
collection do
|
|
|
|
get :autocomplete
|
2019-07-06 16:21:35 -04:00
|
|
|
post :preview
|
2015-04-03 19:31:46 -04:00
|
|
|
end
|
2011-03-15 19:19:49 -04:00
|
|
|
end
|
2019-04-03 21:56:47 -04:00
|
|
|
resources :tag_type_versions
|
2010-10-08 18:42:26 -04:00
|
|
|
resources :tag_aliases do
|
2011-07-20 17:40:45 -04:00
|
|
|
member do
|
2011-10-23 18:50:18 -04:00
|
|
|
post :approve
|
|
|
|
end
|
|
|
|
end
|
2013-03-10 16:31:39 -04:00
|
|
|
resource :tag_alias_request, :only => [:new, :create]
|
2011-10-23 18:50:18 -04:00
|
|
|
resources :tag_implications do
|
|
|
|
member do
|
|
|
|
post :approve
|
2011-07-20 17:40:45 -04:00
|
|
|
end
|
2010-10-08 18:42:26 -04:00
|
|
|
end
|
2013-03-10 16:31:39 -04:00
|
|
|
resource :tag_implication_request, :only => [:new, :create]
|
2019-10-22 02:05:40 -04:00
|
|
|
resources :uploads
|
2011-12-01 18:27:11 -05:00
|
|
|
resources :users do
|
2015-06-30 16:13:57 -04:00
|
|
|
resource :password, :only => [:edit], :controller => "maintenance/user/passwords"
|
2016-12-17 23:32:01 -05:00
|
|
|
resource :api_key, :only => [:show, :view, :update, :destroy], :controller => "maintenance/user/api_keys" do
|
|
|
|
post :view
|
|
|
|
end
|
2015-06-30 16:13:57 -04:00
|
|
|
|
2011-12-01 18:27:11 -05:00
|
|
|
collection do
|
2019-08-17 12:00:26 -04:00
|
|
|
get :home
|
2012-02-20 15:33:42 -05:00
|
|
|
get :search
|
2019-12-29 05:37:50 -05:00
|
|
|
get :upload_limit
|
2013-07-19 10:02:08 -04:00
|
|
|
get :custom_style
|
2011-12-01 18:27:11 -05:00
|
|
|
end
|
|
|
|
end
|
2013-04-27 21:39:55 -04:00
|
|
|
resources :user_feedbacks do
|
|
|
|
collection do
|
|
|
|
get :search
|
|
|
|
end
|
|
|
|
end
|
2013-03-26 01:03:42 -04:00
|
|
|
resources :user_name_change_requests do
|
|
|
|
member do
|
|
|
|
post :approve
|
|
|
|
post :reject
|
|
|
|
end
|
|
|
|
end
|
2016-09-28 07:56:12 -04:00
|
|
|
resource :user_revert, :only => [:new, :create]
|
2010-03-10 18:21:43 -05:00
|
|
|
resources :wiki_pages do
|
|
|
|
member do
|
|
|
|
put :revert
|
|
|
|
end
|
2011-10-22 17:23:33 -04:00
|
|
|
collection do
|
2013-02-21 13:27:01 -05:00
|
|
|
get :search
|
2011-10-22 17:23:33 -04:00
|
|
|
get :show_or_new
|
|
|
|
end
|
2010-03-10 18:21:43 -05:00
|
|
|
end
|
2013-02-23 20:08:20 -05:00
|
|
|
resources :wiki_page_versions, :only => [:index, :show, :diff] do
|
|
|
|
collection do
|
|
|
|
get :diff
|
|
|
|
end
|
|
|
|
end
|
2019-02-28 14:24:04 -05:00
|
|
|
resources :blips do
|
|
|
|
member do
|
|
|
|
post :hide
|
|
|
|
post :unhide
|
|
|
|
end
|
|
|
|
end
|
2019-03-15 01:15:37 -04:00
|
|
|
resources :post_report_reasons
|
2019-03-20 08:14:08 -04:00
|
|
|
resources :post_sets do
|
|
|
|
collection do
|
|
|
|
get :atom
|
2019-09-19 00:16:19 -04:00
|
|
|
get :for_select
|
2019-03-20 08:14:08 -04:00
|
|
|
end
|
|
|
|
member do
|
|
|
|
get :maintainers
|
|
|
|
get :post_list
|
|
|
|
post :update_posts
|
|
|
|
post :add_posts
|
|
|
|
post :remove_posts
|
|
|
|
end
|
|
|
|
end
|
|
|
|
resources :post_set_maintainers do
|
|
|
|
member do
|
2019-09-16 20:19:17 -04:00
|
|
|
get :approve
|
|
|
|
get :block
|
|
|
|
get :deny
|
2019-03-20 08:14:08 -04:00
|
|
|
end
|
|
|
|
end
|
2019-08-31 19:08:16 -04:00
|
|
|
resource :email do
|
|
|
|
collection do
|
|
|
|
get :activate_user
|
|
|
|
get :resend_confirmation
|
|
|
|
end
|
|
|
|
end
|
2013-03-19 08:10:10 -04:00
|
|
|
|
2011-09-21 16:30:44 -04:00
|
|
|
# aliases
|
|
|
|
resources :wpages, :controller => "wiki_pages"
|
|
|
|
resources :ftopics, :controller => "forum_topics"
|
|
|
|
resources :fposts, :controller => "forum_posts"
|
2011-06-12 16:41:23 -04:00
|
|
|
|
2011-11-11 15:56:52 -05:00
|
|
|
# legacy aliases
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/artist" => redirect {|params, req| "/artists?page=#{req.params[:page]}&search[name]=#{CGI::escape(req.params[:name].to_s)}"}
|
|
|
|
get "/artist/index" => redirect {|params, req| "/artists?page=#{req.params[:page]}"}
|
|
|
|
get "/artist/show/:id" => redirect("/artists/%{id}")
|
|
|
|
get "/artist/show" => redirect {|params, req| "/artists?name=#{CGI::escape(req.params[:name].to_s)}"}
|
|
|
|
get "/artist/history/:id" => redirect("/artist_versions?search[artist_id]=%{id}")
|
|
|
|
get "/artist/recent_changes" => redirect("/artist_versions")
|
2013-03-19 08:10:10 -04:00
|
|
|
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/comment" => redirect {|params, req| "/comments?page=#{req.params[:page]}"}
|
|
|
|
get "/comment/index" => redirect {|params, req| "/comments?page=#{req.params[:page]}"}
|
|
|
|
get "/comment/show/:id" => redirect("/comments/%{id}")
|
|
|
|
get "/comment/new" => redirect("/comments")
|
|
|
|
get("/comment/search" => redirect do |params, req|
|
2013-05-11 10:18:39 -04:00
|
|
|
if req.params[:query] =~ /^user:(.+)/i
|
|
|
|
"/comments?group_by=comment&search[creator_name]=#{CGI::escape($1)}"
|
|
|
|
else
|
|
|
|
"/comments/search"
|
|
|
|
end
|
|
|
|
end)
|
2013-03-19 08:10:10 -04:00
|
|
|
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/favorite" => redirect {|params, req| "/favorites?page=#{req.params[:page]}"}
|
|
|
|
get "/favorite/index" => redirect {|params, req| "/favorites?page=#{req.params[:page]}"}
|
2013-03-19 08:10:10 -04:00
|
|
|
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/forum" => redirect {|params, req| "/forum_topics?page=#{req.params[:page]}"}
|
|
|
|
get "/forum/index" => redirect {|params, req| "/forum_topics?page=#{req.params[:page]}"}
|
|
|
|
get "/forum/show/:id" => redirect {|params, req| "/forum_posts/#{req.params[:id]}?page=#{req.params[:page]}"}
|
|
|
|
get "/forum/search" => redirect("/forum_posts/search")
|
2011-11-11 15:56:52 -05:00
|
|
|
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/help/:title" => redirect {|params, req| ("/wiki_pages?title=#{CGI::escape('help:' + req.params[:title])}")}
|
2013-03-10 16:36:54 -04:00
|
|
|
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/note" => redirect {|params, req| "/notes?page=#{req.params[:page]}"}
|
|
|
|
get "/note/index" => redirect {|params, req| "/notes?page=#{req.params[:page]}"}
|
|
|
|
get "/note/history" => redirect {|params, req| "/note_versions?search[updater_id]=#{req.params[:user_id]}"}
|
2013-03-19 08:10:10 -04:00
|
|
|
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/pool" => redirect {|params, req| "/pools?page=#{req.params[:page]}"}
|
|
|
|
get "/pool/index" => redirect {|params, req| "/pools?page=#{req.params[:page]}"}
|
|
|
|
get "/pool/show/:id" => redirect("/pools/%{id}")
|
|
|
|
get "/pool/history/:id" => redirect("/pool_versions?search[pool_id]=%{id}")
|
|
|
|
get "/pool/recent_changes" => redirect("/pool_versions")
|
2013-03-19 08:10:10 -04:00
|
|
|
|
2020-03-04 10:03:51 -05:00
|
|
|
get "/post/index/:page/:tags" => redirect {|params, req| "/posts?tags=#{CGI::escape(params[:tags].to_s)}&page=#{params[:page].to_i}"}
|
|
|
|
get "/post/index/:page" => redirect {|params, req| "/posts?tags=&page=#{params[:page].to_i}"}
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/post/index" => redirect {|params, req| "/posts?tags=#{CGI::escape(req.params[:tags].to_s)}&page=#{req.params[:page]}"}
|
|
|
|
get "/post" => redirect {|params, req| "/posts?tags=#{CGI::escape(req.params[:tags].to_s)}&page=#{req.params[:page]}"}
|
|
|
|
get "/post/upload" => redirect("/uploads/new")
|
|
|
|
get "/post/moderate" => redirect("/moderator/post/queue")
|
|
|
|
get "/post/atom" => redirect {|params, req| "/posts.atom?tags=#{CGI::escape(req.params[:tags].to_s)}"}
|
|
|
|
get "/post/atom.feed" => redirect {|params, req| "/posts.atom?tags=#{CGI::escape(req.params[:tags].to_s)}"}
|
|
|
|
get "/post/popular_by_day" => redirect("/explore/posts/popular")
|
|
|
|
get "/post/popular_by_week" => redirect("/explore/posts/popular")
|
|
|
|
get "/post/popular_by_month" => redirect("/explore/posts/popular")
|
|
|
|
get "/post/show/:id/:tag_title" => redirect("/posts/%{id}")
|
|
|
|
get "/post/show/:id" => redirect("/posts/%{id}")
|
|
|
|
get "/post/show" => redirect {|params, req| "/posts?md5=#{req.params[:md5]}"}
|
|
|
|
get "/post/view/:id/:tag_title" => redirect("/posts/%{id}")
|
|
|
|
get "/post/view/:id" => redirect("/posts/%{id}")
|
|
|
|
get "/post/flag/:id" => redirect("/posts/%{id}")
|
2013-03-19 08:10:10 -04:00
|
|
|
|
2014-04-14 17:32:01 -04:00
|
|
|
get("/post_tag_history" => redirect do |params, req|
|
2013-05-11 13:41:32 -04:00
|
|
|
page = req.params[:before_id].present? ? "b#{req.params[:before_id]}" : req.params[:page]
|
|
|
|
"/post_versions?page=#{page}&search[updater_id]=#{req.params[:user_id]}"
|
|
|
|
end)
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/post_tag_history/index" => redirect {|params, req| "/post_versions?page=#{req.params[:page]}&search[post_id]=#{req.params[:post_id]}"}
|
2013-03-19 08:10:10 -04:00
|
|
|
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/tag" => redirect {|params, req| "/tags?page=#{req.params[:page]}&search[name_matches]=#{CGI::escape(req.params[:name].to_s)}&search[order]=#{req.params[:order]}&search[category]=#{req.params[:type]}"}
|
|
|
|
get "/tag/index" => redirect {|params, req| "/tags?page=#{req.params[:page]}&search[name_matches]=#{CGI::escape(req.params[:name].to_s)}&search[order]=#{req.params[:order]}"}
|
2013-03-19 08:10:10 -04:00
|
|
|
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/tag_implication" => redirect {|params, req| "/tag_implications?search[name_matches]=#{CGI::escape(req.params[:query].to_s)}"}
|
2013-03-21 19:25:42 -04:00
|
|
|
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/user" => redirect {|params, req| "/users?page=#{req.params[:page]}"}
|
|
|
|
get "/user/index" => redirect {|params, req| "/users?page=#{req.params[:page]}"}
|
|
|
|
get "/user/show/:id" => redirect("/users/%{id}")
|
|
|
|
get "/user/login" => redirect("/sessions/new")
|
|
|
|
get "/user_record" => redirect {|params, req| "/user_feedbacks?search[user_id]=#{req.params[:user_id]}"}
|
2013-03-19 08:10:10 -04:00
|
|
|
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/wiki" => redirect {|params, req| "/wiki_pages?page=#{req.params[:page]}"}
|
|
|
|
get "/wiki/index" => redirect {|params, req| "/wiki_pages?page=#{req.params[:page]}"}
|
|
|
|
get "/wiki/rename" => redirect("/wiki_pages")
|
|
|
|
get "/wiki/show" => redirect {|params, req| "/wiki_pages?title=#{CGI::escape(req.params[:title].to_s)}"}
|
|
|
|
get "/wiki/recent_changes" => redirect {|params, req| "/wiki_page_versions?search[updater_id]=#{req.params[:user_id]}"}
|
|
|
|
get "/wiki/history/:title" => redirect("/wiki_page_versions?title=%{title}")
|
2011-11-11 15:56:52 -05:00
|
|
|
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/static/keyboard_shortcuts" => "static#keyboard_shortcuts", :as => "keyboard_shortcuts"
|
|
|
|
get "/static/site_map" => "static#site_map", :as => "site_map"
|
2020-02-14 02:17:42 -05:00
|
|
|
get "/static/takedown" => "static#takedown", as: "takedown_static"
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/static/terms_of_service" => "static#terms_of_service", :as => "terms_of_service"
|
2014-04-28 16:05:45 -04:00
|
|
|
post "/static/accept_terms_of_service" => "static#accept_terms_of_service", :as => "accept_terms_of_service"
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/static/contact" => "static#contact", :as => "contact"
|
2020-02-02 16:50:20 -05:00
|
|
|
get "/static/discord" => "static#discord", as: "discord_get"
|
|
|
|
post "/static/discord" => "static#discord", as: "discord_post"
|
2020-03-01 11:30:41 -05:00
|
|
|
get "/static/toggle_mobile_mode" => "static#disable_mobile_mode", as: "disable_mobile_mode"
|
2014-04-14 17:32:01 -04:00
|
|
|
get "/meta_searches/tags" => "meta_searches#tags", :as => "meta_searches_tags"
|
2013-03-19 08:10:10 -04:00
|
|
|
|
2015-12-08 18:17:27 -05:00
|
|
|
get "/intro" => redirect("/explore/posts/intro")
|
|
|
|
|
2013-07-09 20:47:29 -04:00
|
|
|
root :to => "posts#index"
|
2016-08-30 17:42:01 -04:00
|
|
|
|
|
|
|
get "*other", :to => "static#not_found"
|
2010-02-04 15:08:49 -05:00
|
|
|
end
|