From 155fafff9a3418c3f7e5bf14c81b8ae0ea0cc9d9 Mon Sep 17 00:00:00 2001 From: jasder Date: Thu, 17 Jun 2021 14:42:32 +0800 Subject: [PATCH] FIX code bug --- app/controllers/repositories_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 6594d06e9..93ba02a92 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -56,9 +56,7 @@ class RepositoriesController < ApplicationController # TODO # 临时处理readme文件问题 - 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) + result = Gitea::Repository::Readme::GetService.call(@owner.login, @project.identifier, @ref, @owner&.gitea_token) @readme = if result[:status] == :success result[:body]