Hiosdra
10/29/2019, 8:51 PM.transact on it to make it IO from cats.
Example method: def insertTask(task: ScheduledTask): IO[Either[RepositoryError, Unit]]
Then in facade, we do some logic, invoke repository method and add some more logic and return everything.
Facade method is something like: def createTask(
taskDto: TaskDto,
username: String
): IO[Either[Error, Result.Now[TaskCreationResultDto]]]
And in web controller we return this:
facade.createTask(dto, username).unsafeRunSync