<@U5MPVGMQD> a better idiom for that operation tha...
# arrow
r
@aeruhxi a better idiom for that operation that contemplates all cases of Either is
fold
.
Copy code
newPost.fold(
 { call.respond(HttpStatusCode.NotFound, mapOf("message" to "One of ids supplied does not exist.")) },
 { call.respond(HttpStatusCode.Created, mapOf("post" to it)) }
)