1
0

admin.rb 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. # frozen_string_literal: true
  2. namespace :admin do
  3. get '/dashboard', to: 'dashboard#index'
  4. resources :domain_allows, only: [:new, :create, :destroy]
  5. resources :domain_blocks, only: [:new, :create, :destroy, :update, :edit] do
  6. collection do
  7. post :batch
  8. end
  9. end
  10. resources :export_domain_allows, only: [:new] do
  11. collection do
  12. get :export, constraints: { format: :csv }
  13. post :import
  14. end
  15. end
  16. resources :export_domain_blocks, only: [:new] do
  17. collection do
  18. get :export, constraints: { format: :csv }
  19. post :import
  20. end
  21. end
  22. resources :email_domain_blocks, only: [:index, :new, :create] do
  23. collection do
  24. post :batch
  25. end
  26. end
  27. resources :action_logs, only: [:index]
  28. resources :warning_presets, except: [:new, :show]
  29. resources :announcements, except: [:show] do
  30. member do
  31. post :publish
  32. post :unpublish
  33. end
  34. end
  35. with_options to: redirect('/admin/settings/branding') do
  36. get '/settings'
  37. get '/settings/edit'
  38. end
  39. namespace :settings do
  40. resource :branding, only: [:show, :update], controller: 'branding'
  41. resource :registrations, only: [:show, :update], controller: 'registrations'
  42. resource :content_retention, only: [:show, :update], controller: 'content_retention'
  43. resource :about, only: [:show, :update], controller: 'about'
  44. resource :appearance, only: [:show, :update], controller: 'appearance'
  45. resource :discovery, only: [:show, :update], controller: 'discovery'
  46. end
  47. resources :site_uploads, only: [:destroy]
  48. resources :invites, only: [:index, :create, :destroy] do
  49. collection do
  50. post :deactivate_all
  51. end
  52. end
  53. resources :relays, only: [:index, :new, :create, :destroy] do
  54. member do
  55. post :enable
  56. post :disable
  57. end
  58. end
  59. resources :instances, only: [:index, :show, :destroy], constraints: { id: %r{[^/]+} }, format: 'html' do
  60. member do
  61. post :clear_delivery_errors
  62. post :restart_delivery
  63. post :stop_delivery
  64. end
  65. end
  66. resources :rules, only: [:index, :create, :edit, :update, :destroy]
  67. resources :webhooks do
  68. member do
  69. post :enable
  70. post :disable
  71. end
  72. resource :secret, only: [], controller: 'webhooks/secrets' do
  73. post :rotate
  74. end
  75. end
  76. resources :reports, only: [:index, :show] do
  77. resources :actions, only: [:create], controller: 'reports/actions' do
  78. collection do
  79. post :preview
  80. end
  81. end
  82. member do
  83. post :assign_to_self
  84. post :unassign
  85. post :reopen
  86. post :resolve
  87. end
  88. end
  89. resources :report_notes, only: [:create, :destroy]
  90. resources :accounts, only: [:index, :show, :destroy] do
  91. member do
  92. post :enable
  93. post :unsensitive
  94. post :unsilence
  95. post :unsuspend
  96. post :redownload
  97. post :remove_avatar
  98. post :remove_header
  99. post :memorialize
  100. post :approve
  101. post :reject
  102. post :unblock_email
  103. end
  104. collection do
  105. post :batch
  106. end
  107. resource :change_email, only: [:show, :update]
  108. resource :reset, only: [:create]
  109. resource :action, only: [:new, :create], controller: 'account_actions'
  110. resources :statuses, only: [:index, :show] do
  111. collection do
  112. post :batch
  113. end
  114. end
  115. resources :relationships, only: [:index]
  116. resource :confirmation, only: [:create] do
  117. collection do
  118. post :resend
  119. end
  120. end
  121. end
  122. resources :users, only: [] do
  123. scope module: :users do
  124. resource :two_factor_authentication, only: [:destroy]
  125. resource :role, only: [:show, :update]
  126. end
  127. end
  128. resources :custom_emojis, only: [:index, :new, :create] do
  129. collection do
  130. post :batch
  131. end
  132. end
  133. resources :ip_blocks, only: [:index, :new, :create] do
  134. collection do
  135. post :batch
  136. end
  137. end
  138. resources :roles, except: [:show]
  139. resources :account_moderation_notes, only: [:create, :destroy]
  140. resource :follow_recommendations, only: [:show, :update]
  141. resources :tags, only: [:index, :show, :update]
  142. namespace :trends do
  143. resources :links, only: [:index] do
  144. collection do
  145. post :batch
  146. end
  147. end
  148. resources :tags, only: [:index] do
  149. collection do
  150. post :batch
  151. end
  152. end
  153. resources :statuses, only: [:index] do
  154. collection do
  155. post :batch
  156. end
  157. end
  158. namespace :links do
  159. resources :preview_card_providers, only: [:index], path: :publishers do
  160. collection do
  161. post :batch
  162. end
  163. end
  164. end
  165. end
  166. namespace :disputes do
  167. resources :appeals, only: [:index] do
  168. member do
  169. post :approve
  170. post :reject
  171. end
  172. end
  173. end
  174. resources :software_updates, only: [:index]
  175. end