修复:分支返回更改为数组

This commit is contained in:
2023-03-31 10:31:10 +08:00
parent c78badf091
commit 53458dab8f
2 changed files with 3 additions and 3 deletions

View File

@@ -94,7 +94,7 @@ class ProjectsController < ApplicationController
# result = Gitea::Repository::Branches::ListService.call(@owner, @project.identifier)
result = Gitea::Repository::Branches::ListNameService.call(@owner, @project.identifier, params[:name])
@branches = result.is_a?(Hash) ? (result.key?(:status) ? [] : result["branch_name"]) : result
@branches = result.is_a?(Hash) ? (result.key?(:status) ? [] : result) : result
end
def branches_slice