Fixed 400 with share room and merge user (#2448)

This commit is contained in:
Ahmad Farhat 2021-01-19 18:28:10 -05:00 committed by GitHub
parent 957bf88a85
commit 656e4057cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -209,13 +209,12 @@ class AdminsController < ApplicationController
initial_list = User.without_role(:super_admin)
.where.not(uid: current_user.uid)
.merge_list_search(params[:search])
.pluck_to_hash(:uid, :name, :email)
initial_list = initial_list.where(provider: @user_domain) if Rails.configuration.loadbalanced_configuration
# Respond with JSON object of users
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

View File

@ -212,13 +212,12 @@ class UsersController < ApplicationController
initial_list = User.where.not(uid: params[:owner_uid])
.with_role(roles_can_appear)
.shared_list_search(params[:search])
.pluck_to_hash(:uid, :name)
initial_list = initial_list.where(provider: @user_domain) if Rails.configuration.loadbalanced_configuration
# Respond with JSON object of users
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