You have to be careful when implementing the DRY principle across service orientated applications. Often, a service forms it's own Bounded Context, where you will want to be able to evolve code independently of business logic in other services. The exception to this rule is "Utility" code that addresses cross-cutting concerns throughout a vertical slice.
With respect to the specific example you give - you have decoupled your logic from how it is hosted. This does not violate DRY, since the context of the code is different.