mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-13 00:06:01 +08:00
FIX get user info with branches api
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user