mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
FIX project search wrong
This commit is contained in:
@@ -140,8 +140,8 @@ class Ci::CloudAccountsController < Ci::BaseController
|
||||
|
||||
# TODO
|
||||
# 删除用户项目下的与ci相关的所有webhook
|
||||
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)
|
||||
user.projects.select(:id, :identifier, :gitea_webhook_id).each do |project|
|
||||
result = Gitea::Hooks::DestroyService.call(user.gitea_token, user.login, project.identifier, project.gitea_webhook_id) unless project.gitea_webhook_id.blank?
|
||||
project.update_column(:gitea_webhook_id, nil) if result.status == 204
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user