Skip to content

Commit

Permalink
Fixed 400 with share room and merge user (#2448)
Browse files Browse the repository at this point in the history
  • Loading branch information
farhatahmad committed Jan 19, 2021
1 parent 957bf88 commit 656e405
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/controllers/admins_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,12 @@ def merge_list
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

Expand Down
3 changes: 1 addition & 2 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,12 @@ def shared_access_list
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

Expand Down

0 comments on commit 656e405

Please sign in to comment.