FIX get readme api method

This commit is contained in:
jasder 2021-03-21 11:24:34 +08:00
parent c07c570061
commit 0909223867
1 changed files with 13 additions and 9 deletions

View File

@ -1,6 +1,10 @@
json.content @project.content
json.website @project.website
json.readme @result[:readme].merge(content: readme_render_decode64_content(@result[:readme]["content"], nil))
if @result[:readme].blank?
json.readme nil!
else
json.readme @result[:readme].merge(content: readme_render_decode64_content(@result[:readme]["content"], nil))
end
json.identifier render_identifier(@project)
json.name @project.name
json.project_id @project.id