about summary refs log tree commit diff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-04-13 07:04:23 -0400
committerEugen <eugen@zeonfederated.com>2017-04-13 13:04:23 +0200
commit3a9eb81a8006af0306e8abc54bd8aca8381eee25 (patch)
tree9bae0b991f7db4cfe0de626829995346cdb29549 /config/routes.rb
parent0e39cc6a35661416a1f1ccb8841863f7bf307020 (diff)
Admin accounts controller cleanup (#1664)
* Remove unused account_params method in admin/accounts controller

* Introduce AccountFilter to find accounts

* Use AccountFilter in admin/accounts controller

* Use more restful routes admin silence and suspension area

* Add admin/silences and admin/suspensions controllers
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 78bf7870c..ca3f31055 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,3 +1,4 @@
+
 # frozen_string_literal: true
 
 require 'sidekiq/web'
@@ -89,12 +90,8 @@ Rails.application.routes.draw do
     end
 
     resources :accounts, only: [:index, :show] do
-      member do
-        post :silence
-        post :unsilence
-        post :suspend
-        post :unsuspend
-      end
+      resource :silence, only: [:create, :destroy]
+      resource :suspension, only: [:create, :destroy]
     end
   end