Skip to content

Commit

Permalink
Stop using FoundUserWithStatusSerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPrigorshnev committed Feb 7, 2024
1 parent ae26c05 commit fb1e816
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/controllers/discourse_assign/assign_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ class AssignController < ApplicationController

def suggestions
users = [current_user, *recent_assignees]
each_serializer =
SiteSetting.enable_user_status? ? FoundUserWithStatusSerializer : FoundUserSerializer

render json: {
assign_allowed_on_groups:
Group.visible_groups(current_user).assign_allowed_groups.pluck(:name),
Expand All @@ -20,7 +17,8 @@ def suggestions
ActiveModel::ArraySerializer.new(
users,
scope: guardian,
each_serializer: each_serializer,
each_serializer: FoundUserSerializer,
include_status: true
),
}
end
Expand Down

0 comments on commit fb1e816

Please sign in to comment.