新增:查询用户需传type值

This commit is contained in:
yystopf 2024-03-22 08:49:26 +08:00
parent b8b5828a7c
commit b91358a7fe
1 changed files with 1 additions and 1 deletions

View File

@ -715,7 +715,7 @@ class ApplicationController < ActionController::Base
end
def find_user_with_id
@user = User.find_by_id params[:user_id]
@user = User.find_by(type: 'User', id: params[:user_id])
# render_not_found("未找到’#{params[:login]}’相关的用户") unless @user
render_error("未找到相关的用户") unless @user
end