FIX get user info with branches api

This commit is contained in:
Jasder 2020-05-29 17:35:02 +08:00
parent 507f276596
commit f609b711c2
1 changed files with 2 additions and 2 deletions

View File

@ -13,13 +13,13 @@ json.array! @branches do |branch|
json.time_from_now time_from_now(branch['commit']['timestamp'])
end
user = User.find_by_login branch['commit']['author']['name']
user = User.find_by_login branch['commit']['author']['username']
json.author do
if user
json.login user.login
json.image_url url_to_avatar(user)
else
json.nil
json.nil!
end
end
end