Conversation
mburri
left a comment
There was a problem hiding this comment.
Looks better now but I still think that there is way too much logic in the controllers...
IMHO, The rest endpoints should take the input. Transform it into a command (the command does some input validation) and hands it then to a service or use case the is implemented in AMW_business.
There, exceptions are thrown, e.g. if a resource is not found or some other stuff happens.
I also think that we should move the command into AMW_business. And the service method should just get the command. If you want to do this, you cannot use the DTO in the command - because you cannot (or should not) use stuff from AMW_Rest (the outer ring) in AMW_bussines... (the inner ring)... because depdendencies should only point to inner rings...
fixes the issues from #980