FIX [bug]临时处理获取readme文件问题

This commit is contained in:
jasder 2021-05-21 18:34:33 +08:00
parent ffa74e92a3
commit 5b2d6a8063
1 changed files with 7 additions and 1 deletions

View File

@ -57,7 +57,13 @@ class RepositoriesController < ApplicationController
# TODO
# 临时处理readme文件问题
admin = User.where(admin: true).last
@readme = Gitea::Repository::Readme::GetService.call(@owner.login, @project.identifier, @ref, admin&.gitea_token)
result = Gitea::Repository::Readme::GetService.call(@owner.login, @project.identifier, @ref, admin&.gitea_token)
@readme =
if result[:status] == :success
result[:body]
else
{}
end
end
end