修复: 合并从develop

This commit is contained in:
yystopf 2022-05-24 18:10:20 +08:00
commit ad9bb8e542
2 changed files with 5 additions and 2 deletions

View File

@ -305,7 +305,6 @@ class UsersController < ApplicationController
def email_search
return render_error('请输入email') if params[:email].blank?
@user = User.find_by(mail: params[:email])
return render_not_found unless @user.present?
end
private

View File

@ -1 +1,5 @@
json.partial! 'users/user', locals: { user: @user }
if @user.present?
json.partial! 'users/user', locals: { user: @user }
else
json.null
end