change hook create and update params
This commit is contained in:
parent
0b89372eef
commit
7033bccca9
|
@ -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功能
|
Gitea::Hooks::CreateService.new(@user, @repository.try(:identifier), hook_params).call #创建gitea的hook功能
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
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
|
response = Gitea::Hooks::UpdateService.new(@user, @repository.try(:identifier), hook_params, params[:id]).call
|
||||||
if response.status == 200
|
if response.status == 200
|
||||||
normal_status(1, "更新成功")
|
normal_status(1, "更新成功")
|
||||||
|
|
Loading…
Reference in New Issue