Merge pull request '修复 softbuild 回调接口异常' (#323) from KingChan/forgeplus:standalone_develop into standalone_develop

This commit is contained in:
KingChan 2024-11-28 16:51:10 +08:00
commit d2dd376323
1 changed files with 2 additions and 1 deletions

View File

@ -54,7 +54,8 @@ class SitePagesController < ApplicationController
user = User.find_by_login params[:repository][:owner][:login]
return normal_status(-1, '你还未开通Page服务无法进行部署') unless user.website_permission
project = Project.where(identifier: params[:repository][:name],user_id: user.id)
project = Project.find_by(identifier: params[:repository][:name],user_id: user.id)
return normal_status(-1, '项目不存在') if project.nil?
return normal_status(-1, '你没有权限操作') if project.owner?(user)
return normal_status(-1, '该仓库还未开通Page服务无法进行部署') if Page.exists?(user: user, project: project)