aeruhxi
02/11/2018, 7:24 AMEither
inside when
?
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*/))
}