refactor: route assignment handoff through service
This commit is contained in:
@@ -34,8 +34,11 @@ class Api::V1::Accounts::Conversations::AssignmentsController < Api::V1::Account
|
||||
end
|
||||
|
||||
def set_team
|
||||
@team = Current.account.teams.find_by(id: params[:team_id])
|
||||
@conversation.update!(team: @team)
|
||||
@team = Conversations::AssignmentService.new(
|
||||
conversation: @conversation,
|
||||
team_id: params[:team_id]
|
||||
).perform
|
||||
|
||||
render json: @team
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user