[FIX]成员细节修改

This commit is contained in:
viletyy 2021-01-15 17:19:34 +08:00
parent 7f309edc91
commit 31858a79e3
3 changed files with 14 additions and 4 deletions

View File

@ -0,0 +1,8 @@
json.user_id user.id
json.login user.login
json.name user.full_name
json.mail user.mail
json.identity user.identity
json.watched current_user.watched?(user)
# json.email user.mail # 邮箱原则上不暴露的,如果实在需要的话只能对某些具体的接口公开
json.image_url url_to_avatar(user)

View File

@ -1,6 +1,7 @@
json.id org_user.id
json.user do
json.partial! "/users/user", user: org_user.user
json.partial! "organizations/user_detail", user: org_user.user
end
json.team_names org_user.teams.pluck(:name)
json.team_names org_user.teams.pluck(:name)
json.created_at org_user.created_at.strftime("%Y-%m-%d")

View File

@ -1,4 +1,5 @@
json.id team_user.id
json.user do
json.partial! "/users/user", user: team_user.user
end
json.partial! "organizations/user_detail", user: team_user.user
end
json.created_at team_user.created_at.strftime("%Y-%m-%d")