How do I get the value of `Either` inside `when`? ...
# arrow
a
How do I get the value of
Either
inside
when
?
Copy code
when (newPost) {
            is Either.Left -> return@post call.respond(HttpStatusCode.NotFound, mapOf("message" to "One of ids supplied does not exist."))
            is Either.Right -> call.respond(HttpStatusCode.Created, mapOf("post" to /*insert here*/))
        }