Closed kaungsoe closed 4 years ago
I would make another UseCase. As it does handle a different part of the business logic 🤷♂️
No workaround other than creating new usecase?
I would not call it a workaround, but a good design practice. UseCases (and any classes in general) should be responsible for handling one peace of business logic, hence it will be easy to refactor, test and fix bugs.
Let's say we want to save PostDetail model also in this PostsUseCase, in that case, how do we satisfy the generic constraint for it.