forked from External/greenlight
Fixed 400 with share room and merge user (#2448)
This commit is contained in:
parent
957bf88a85
commit
656e4057cc
|
@ -209,13 +209,12 @@ class AdminsController < ApplicationController
|
||||||
initial_list = User.without_role(:super_admin)
|
initial_list = User.without_role(:super_admin)
|
||||||
.where.not(uid: current_user.uid)
|
.where.not(uid: current_user.uid)
|
||||||
.merge_list_search(params[:search])
|
.merge_list_search(params[:search])
|
||||||
.pluck_to_hash(:uid, :name, :email)
|
|
||||||
|
|
||||||
initial_list = initial_list.where(provider: @user_domain) if Rails.configuration.loadbalanced_configuration
|
initial_list = initial_list.where(provider: @user_domain) if Rails.configuration.loadbalanced_configuration
|
||||||
|
|
||||||
# Respond with JSON object of users
|
# Respond with JSON object of users
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.json { render body: initial_list.to_json }
|
format.json { render body: initial_list.pluck_to_hash(:uid, :name, :email).to_json }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -212,13 +212,12 @@ class UsersController < ApplicationController
|
||||||
initial_list = User.where.not(uid: params[:owner_uid])
|
initial_list = User.where.not(uid: params[:owner_uid])
|
||||||
.with_role(roles_can_appear)
|
.with_role(roles_can_appear)
|
||||||
.shared_list_search(params[:search])
|
.shared_list_search(params[:search])
|
||||||
.pluck_to_hash(:uid, :name)
|
|
||||||
|
|
||||||
initial_list = initial_list.where(provider: @user_domain) if Rails.configuration.loadbalanced_configuration
|
initial_list = initial_list.where(provider: @user_domain) if Rails.configuration.loadbalanced_configuration
|
||||||
|
|
||||||
# Respond with JSON object of users
|
# Respond with JSON object of users
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.json { render body: initial_list.to_json }
|
format.json { render body: initial_list.pluck_to_hash(:uid, :name).to_json }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue