新增:exter_token和inter_token

This commit is contained in:
2024-04-24 15:17:13 +08:00
parent e9237d7789
commit 9c32cd8769
3 changed files with 15 additions and 12 deletions

View File

@@ -44,7 +44,7 @@ class Api::V1::Projects::SyncRepositoriesController < Api::V1::BaseController
def change_enable
return render_error("请输入正确的分支名称") if params[:gitlink_branch_name].blank? || params[:external_branch_name].blank?
return render_error("请输入正确的状态") if params[:enable].blank?
# return render_error("请输入正确的状态") if params[:enable].blank?
@sync_repository_branches = SyncRepositoryBranch.joins(:sync_repository).where(sync_repositories: {project_id: @project.id}, gitlink_branch_name: params[:gitlink_branch_name], external_branch_name: params[:external_branch_name])
if @sync_repository_branches.update_all({enable: params[:enable]})
@sync_repository_branches.each do |branch|