mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
Return User objects instead of hashes
This commit is contained in:
@ -294,7 +294,8 @@ class UsersController < ApplicationController
|
||||
|
||||
results = UserSearch.search term, topic_id
|
||||
|
||||
render :json => results
|
||||
render json: { users: results.as_json( only: [ :username, :name ],
|
||||
methods: :avatar_template ) }
|
||||
end
|
||||
|
||||
private
|
||||
|
Reference in New Issue
Block a user