FIX [用户查询方式]临时处理获取readme文件问题

This commit is contained in:
jasder 2021-05-21 19:26:17 +08:00
parent a8e53d4e5c
commit e0eae66ab4
1 changed files with 2 additions and 1 deletions

View File

@ -56,7 +56,8 @@ class RepositoriesController < ApplicationController
# TODO
# 临时处理readme文件问题
admin = User.find_by_login "jasder"
admin = current_user.blank? ? User.where(admin: true).last : current_user
result = Gitea::Repository::Readme::GetService.call(@owner.login, @project.identifier, @ref, admin&.gitea_token)
@readme =
if result[:status] == :success