mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-22 12:45:46 +08:00
fixed 授权登录绑定账号返回用户信息
This commit is contained in:
@@ -12,7 +12,7 @@ class BindUsersController < ApplicationController
|
||||
tip_exception '该账号已被绑定,请更换其他账号进行绑定' if bind_user.bind_open_user?(params[:type].to_s)
|
||||
|
||||
"OpenUsers::#{params[:type].to_s.capitalize}".constantize.create!(user: bind_user, uid: session[:unionid])
|
||||
render_ok
|
||||
@user = bind_user
|
||||
end
|
||||
|
||||
def new_user
|
||||
|
||||
8
app/views/bind_users/create.json.jbuilder
Normal file
8
app/views/bind_users/create.json.jbuilder
Normal file
@@ -0,0 +1,8 @@
|
||||
json.username @user.full_name
|
||||
json.real_name @user.real_name
|
||||
json.login @user.login
|
||||
json.user_id @user.id
|
||||
json.image_url url_to_avatar(@user)
|
||||
json.admin @user.admin?
|
||||
json.user_identity @user.identity
|
||||
json.is_watch current_user&.watched?(@user)
|
||||
Reference in New Issue
Block a user