change hook create and update params

This commit is contained in:
sylor_huang@126.com 2020-05-19 13:56:17 +08:00
parent 0b89372eef
commit 7033bccca9
1 changed files with 2 additions and 2 deletions

View File

@ -51,12 +51,12 @@ class HooksController < ApplicationController
# }
# }
hook_params = params[:hook_params].compact
hook_params = params[:hook_params]
Gitea::Hooks::CreateService.new(@user, @repository.try(:identifier), hook_params).call #创建gitea的hook功能
end
def update
hook_params = params[:hook_params].compact
hook_params = params[:hook_params]
response = Gitea::Hooks::UpdateService.new(@user, @repository.try(:identifier), hook_params, params[:id]).call
if response.status == 200
normal_status(1, "更新成功")