forked from Trustie/forgeplus
修复:转移后仓库无法正确新建处理
This commit is contained in:
parent
e89a93e8ca
commit
5dfc0e74a8
|
|
@ -41,7 +41,7 @@ class Repositories::CreateService < ApplicationService
|
|||
begin
|
||||
@gitea_repository = $gitea_client.get_repos_by_owner_repo(project.owner.login, params[:identifier])
|
||||
rescue Gitea::Api::ServerError => e
|
||||
if e.http_code.to_i == 404
|
||||
if e.http_code.to_i == 404 || e.http_code.to_i == 307
|
||||
if project.owner.is_a?(User)
|
||||
# @gitea_repository = Gitea::Repository::CreateService.new(user.gitea_token, gitea_repository_params).call
|
||||
@gitea_repository = $gitea_client.post_user_repos({query: {token: user.gitea_token}, body: gitea_repository_params.to_json})
|
||||
|
|
|
|||
Loading…
Reference in New Issue