render_error替换成tip_exception

This commit is contained in:
xiaoxiaoqiong
2022-05-30 10:24:39 +08:00
parent a6e50d2a25
commit 17fb43cea8

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