更改:webhook创建数量限制为50个

This commit is contained in:
yystopf 2022-09-08 14:19:08 +08:00
parent b1f460d760
commit 4bd77a870b
1 changed files with 1 additions and 0 deletions

View File

@ -10,6 +10,7 @@ class Api::V1::Projects::WebhooksController < Api::V1::BaseController
end end
def create def create
return render_error("webhooks数量已到上限请删除暂不使用的webhooks以进行添加操作") if @project.webhooks.size > 49
@result_object = Api::V1::Projects::Webhooks::CreateService.call(@project, create_webhook_params, current_user&.gitea_token) @result_object = Api::V1::Projects::Webhooks::CreateService.call(@project, create_webhook_params, current_user&.gitea_token)
end end