fixed ci报错200处理

This commit is contained in:
xiaoxiaoqiong 2022-05-27 16:54:09 +08:00
parent 1220223322
commit e76822eb34
1 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ class Ci::ProjectsController < Ci::BaseController
ActiveRecord::Base.transaction do
if @repo
@repo.destroy! if @repo&.repo_user_id == 0
return render_error('该项目已经激活') if @repo.repo_active?
return tip_exception('该项目已经激活') if @repo.repo_active?
@repo.activate!(@project)
else
@repo = Ci::Repo.auto_create!(@ci_user, @project)
@ -55,7 +55,7 @@ class Ci::ProjectsController < Ci::BaseController
end
render_ok
rescue Exception => ex
render_error(ex.message)
tip_exception(ex.message)
end
end