From 1459e2f62648ffa0c30fe2aac929866ee002ba38 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Wed, 9 Oct 2024 16:09:42 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=20=E5=88=A0=E9=99=A4=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=97=B6issue=EF=BC=8Cpr=E7=94=A8=E6=88=B7=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=B7=B2=E6=B3=A8=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/api/v1/users/_simple_user.json.jbuilder | 3 ++- app/views/users/_user_simple.json.jbuilder | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/api/v1/users/_simple_user.json.jbuilder b/app/views/api/v1/users/_simple_user.json.jbuilder index a02503828..4d7518bb2 100644 --- a/app/views/api/v1/users/_simple_user.json.jbuilder +++ b/app/views/api/v1/users/_simple_user.json.jbuilder @@ -6,6 +6,7 @@ if user.present? json.image_url Rails.application.config_for(:configuration)['platform_url'] + "/" + url_to_avatar(user).to_s else json.name "已注销" - json.login "" + json.login user&.login + json.type "User" json.image_url Rails.application.config_for(:configuration)['platform_url'] + "/" + User::Avatar.get_letter_avatar_url("D") end \ No newline at end of file diff --git a/app/views/users/_user_simple.json.jbuilder b/app/views/users/_user_simple.json.jbuilder index c45706fe5..2fa5c2717 100644 --- a/app/views/users/_user_simple.json.jbuilder +++ b/app/views/users/_user_simple.json.jbuilder @@ -6,6 +6,7 @@ if user.present? json.image_url url_to_avatar(user) else json.name "已注销" - json.login "" + json.login user&.login + json.type "User" json.image_url Rails.application.config_for(:configuration)['platform_url'] + "/" + User::Avatar.get_letter_avatar_url("D") end \ No newline at end of file