mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-21 20:25:45 +08:00
FIX merge dev_trustie branch
This commit is contained in:
22
app/views/projects/recommend.json.jbuilder
Normal file
22
app/views/projects/recommend.json.jbuilder
Normal file
@@ -0,0 +1,22 @@
|
||||
json.array! @projects do |project|
|
||||
owner = project.owner
|
||||
json.id project.id
|
||||
json.repo_id project&.repository&.id
|
||||
json.identifier project.identifier
|
||||
json.name project.name
|
||||
json.visits project.visits
|
||||
json.author do
|
||||
json.name owner.try(:show_real_name)
|
||||
json.login owner.login
|
||||
json.image_url url_to_avatar(owner)
|
||||
end
|
||||
|
||||
json.category do
|
||||
if project.project_category.blank?
|
||||
json.nil!
|
||||
else
|
||||
json.id project.project_category.id
|
||||
json.name project.project_category.name
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -7,7 +7,7 @@ json.sha entry['sha']
|
||||
json.path entry['path']
|
||||
json.type entry['type']
|
||||
json.size entry['size']
|
||||
json.content entry['content'].present? && !direct_download ? render_decode64_content(entry['content']).force_encoding('UTF-8') : ""
|
||||
json.content entry['content'].present? && !direct_download ? render_decode64_content(entry['content']) : ""
|
||||
json.target entry['target']
|
||||
json.download_url entry['download_url']
|
||||
json.direct_download direct_download
|
||||
|
||||
Reference in New Issue
Block a user