mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
FIX 临时处理获取readme文件问题
This commit is contained in:
@@ -53,6 +53,11 @@ class RepositoriesController < ApplicationController
|
||||
@entries = Gitea::Repository::Entries::ListService.new(@owner, @project.identifier, ref: @ref).call
|
||||
@entries = @entries.present? ? @entries.sort_by{ |hash| hash['type'] } : []
|
||||
@path = Gitea.gitea_config[:domain]+"/#{@project.owner.login}/#{@project.identifier}/raw/branch/#{@ref}/"
|
||||
|
||||
# TODO
|
||||
# 临时处理readme文件问题
|
||||
admin = User.where(admin: true).last
|
||||
@readme = Gitea::Repository::Readme::GetService.call(@owner.login, @project.identifier, @ref, admin&.gitea_token)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -59,4 +59,5 @@ if @project.forge?
|
||||
end
|
||||
end
|
||||
end
|
||||
json.readme @readme
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user