/api/injects/execution...
callback routes: Coupling between routes make for brittle behaviour
#2231
Labels
feature
use for describing a new feature to develop
technical improvement
Technical refactor or improvement is needed
Description
These routes are thightly coupled:
/api/injects/execution/callback/{injectId}
/api/injects/execution/{agentId}/callback/{injectId}
The first one was mistakenly deleted during work to handle multiple agents per host. However it had to be reintroduced due to it being used by the external injectors, specifically the pyhton
http-query
injector.The newly reintroduced first calls the second while passing
null
as the agentId, which is less than ideal and can create more problems down the line, forcing a null handling in the agent-specific route.Desired Solution
Inject update behaviour should be extracted away from the route method and exposed as part of a service, enabling the two routes to call the methods relevant to them in the right fashion. There should be no coupling between the specific code of both routes.l)
The text was updated successfully, but these errors were encountered: