Open vaa25 opened 8 years ago
@vaa25 i dont see any logic there, that should be moved
@AndriyBaibak 1 hour spent
@vaa25 do you mean that controller must only invoke services and not to manipulate other objects?
@AndriyBaibak 1 hour spent
@vaa25 for example in UserRestController
we have method
public void deactivateSubscription() {
User user = userService.getAuthorizedUser();
userService.deactivateUserSubscription(user);
}
Should we refactor it that it will contain method, for example, userService.deactivateAuthorizedUserSubscription()
that will contain User user = userService.getAuthorizedUser();
logic?
@IgorMaksymov @romach one controller method must have only one service method call. This service method can call another service and other methods. This was discussed earlier by PO or TL, I don't remember who of them exactly.
@vaa25 I understood
@AndriyBaibak 1 hour spent
@AndriyBaibak 30 minutes spent
@AndriyBaibak 30 minutes spent
Move logic from UserRestController into services and fix old and add new test for this moving