修改commits的返回值
This commit is contained in:
parent
724c894e32
commit
657b1f36d5
|
@ -1,5 +1,6 @@
|
||||||
json.total_count @hash_commit[:total_count]
|
unless @hash_commit[:status].present? #如果有状态值,则表示报错了
|
||||||
json.commits do
|
json.total_count @hash_commit[:total_count]
|
||||||
|
json.commits do
|
||||||
json.array! @hash_commit[:body] do |commit|
|
json.array! @hash_commit[:body] do |commit|
|
||||||
json.sha commit['sha']
|
json.sha commit['sha']
|
||||||
json.message commit['commit']['message']
|
json.message commit['commit']['message']
|
||||||
|
@ -7,4 +8,6 @@ json.commits do
|
||||||
json.time_from_now time_from_now(commit['commit']['author']['date'])
|
json.time_from_now time_from_now(commit['commit']['author']['date'])
|
||||||
json.partial! 'author', user: @project.owner
|
json.partial! 'author', user: @project.owner
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue