freescout2ant/Jobs
Claude 037d93a014
Refactor: Eliminate duplicate business logic between Controller and Service
Move all business logic from AmeiseController into CrmService:
- getCrmUsers/getFSUsers: remove duplicates from controller, keep in CrmService (now return data arrays instead of HTTP responses)
- Contract transformation: extract to CrmService::getContractsWithDetails()
- Archive orchestration: extract to CrmService::archiveConversationFromRequest()
- DB queries: extract to CrmService::getArchivedContracts()
- ArchiveThreadsJob: use CrmService instead of direct sub-service instantiation

Controller now only handles HTTP request/response, delegating all logic to CrmService.

https://claude.ai/code/session_01Lbqz1JQAYAwFk6EamodxHU
2026-03-22 22:37:36 +00:00
..
ArchiveThreadsJob.php Refactor: Eliminate duplicate business logic between Controller and Service 2026-03-22 22:37:36 +00:00