Hexa
10/13/2018, 10:51 PMmapleft
as I tried and I don't know where to place it. here is my full code snippet val testResult: Either<Errors, Result> = validateUserImpl.validateUser(token)
when (testResult) {
is Either.Right -> {
if (!testResult.b.authorised) {
return unauthorized()
}
// some code here
}
is Either.Left -> {
logger.error("Error", testResult.a.message)
return systemError()
}