FIX code bug
This commit is contained in:
parent
f7d83acafe
commit
15c92597a9
|
@ -140,7 +140,7 @@ class Ci::CloudAccountsController < Ci::BaseController
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
# 删除用户项目下的与ci相关的所有webhook
|
# 删除用户项目下的与ci相关的所有webhook
|
||||||
user.projects.pluck(:identifier, :gitea_webhook_id).each do |project|
|
user.projects.select(:identifier, :gitea_webhook_id).each do |project|
|
||||||
result = Gitea::Hooks::DestroyService.call(user.gitea_token, user.login, project.identifier, project.gitea_webhook_id)
|
result = Gitea::Hooks::DestroyService.call(user.gitea_token, user.login, project.identifier, project.gitea_webhook_id)
|
||||||
project.update_column(:gitea_webhook_id, nil) if result.status == 204
|
project.update_column(:gitea_webhook_id, nil) if result.status == 204
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue