freescout2ant/Http/Controllers
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
..
.gitkeep new code 2023-09-16 16:00:05 +05:30
AmeiseController.php Refactor: Eliminate duplicate business logic between Controller and Service 2026-03-22 22:37:36 +00:00
AmeiseModuleController.php Refactor CRM integration 2025-06-04 19:49:10 +02:00