add page exit for page_migrate

This commit is contained in:
呱呱呱 2023-08-24 17:21:26 +08:00
parent 1d220a6f13
commit 4f5f7639f9
2 changed files with 2 additions and 1 deletions

View File

@ -100,6 +100,8 @@ class ProjectsController < ApplicationController
def page_migrate
return normal_status(-1, "您还未开通Page服务无法进行新建站点") unless current_user.id_card_verify
return normal_status(-1, "你已使用了 #{page_site_params[:identifier]} 作为page标识") if Page.exists?(identifier: page_site_params[:identifier], user: current_user)
Projects::MigrateForm.new(mirror_params).validate!
@project =

View File

@ -17,7 +17,6 @@ class SitePagesController < ApplicationController
end
def create
return normal_status(-1, "你还未通过身份认证无法开通Page") unless current_user.id_card_verify
return normal_status(-1, "你还未开通Page服务无法进行部署") unless current_user.website_permission
return normal_status(-1, "你已使用了 #{params[:identifier]} 作为page标识") if Page.exists?(identifier: params[:identifier], user: current_user)
return normal_status(-1, "该仓库已开通Page服务") if Page.exists?(project: @project)