diff options
Diffstat (limited to 'app/controllers/admin/hooks_controller.rb')
-rw-r--r-- | app/controllers/admin/hooks_controller.rb | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/app/controllers/admin/hooks_controller.rb b/app/controllers/admin/hooks_controller.rb deleted file mode 100644 index 0a463239d74..00000000000 --- a/app/controllers/admin/hooks_controller.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Admin::HooksController < Admin::ApplicationController - def index - @hooks = SystemHook.all - @hook = SystemHook.new - end - - def create - @hook = SystemHook.new(hook_params) - - if @hook.save - redirect_to admin_hooks_path, notice: 'Hook was successfully created.' - else - @hooks = SystemHook.all - render :index - end - end - - def destroy - @hook = SystemHook.find(params[:id]) - @hook.destroy - - redirect_to admin_hooks_path - end - - - def test - @hook = SystemHook.find(params[:hook_id]) - data = { - event_name: "project_create", - name: "Ruby", - path: "ruby", - project_id: 1, - owner_name: "Someone", - owner_email: "example@gitlabhq.com" - } - @hook.execute(data) - - redirect_to :back - end - - def hook_params - params.require(:hook).permit(:url) - end -end |