Merge branch 'develop' into standalone_develop
This commit is contained in:
commit
9022fdcb80
|
@ -9,7 +9,7 @@ class Projects::WebhooksController < Projects::BaseController
|
||||||
|
|
||||||
def create
|
def create
|
||||||
ActiveRecord::Base.transaction do
|
ActiveRecord::Base.transaction do
|
||||||
return render_error("webhooks数量已到上限!请删除暂不使用的webhooks以进行添加操作") if @project.webhooks.size > 19
|
return render_error("webhooks数量已到上限!请删除暂不使用的webhooks以进行添加操作") if @project.webhooks.size > 49
|
||||||
return render_error("参数错误.") unless webhook_params.present?
|
return render_error("参数错误.") unless webhook_params.present?
|
||||||
form = Projects::Webhooks::CreateForm.new(webhook_params)
|
form = Projects::Webhooks::CreateForm.new(webhook_params)
|
||||||
return render json: {status: -1, message: form.errors} unless form.validate!
|
return render json: {status: -1, message: form.errors} unless form.validate!
|
||||||
|
|
Loading…
Reference in New Issue