refactor: route assignment handoff through service

This commit is contained in:
Sojan Jose
2026-07-06 21:56:12 -07:00
parent 1f35360ecb
commit ce178cd3fe
4 changed files with 82 additions and 28 deletions
@@ -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