Skip to content

Instantly share code, notes, and snippets.

@amencke
Last active July 13, 2021 04:47
Show Gist options
  • Save amencke/6016d71a6c696c76a47dceb689ccdac3 to your computer and use it in GitHub Desktop.
Save amencke/6016d71a6c696c76a47dceb689ccdac3 to your computer and use it in GitHub Desktop.
onComplete(maybeSessionGranted) {
case Success(SessionGranted(session)) =>
postMessage(conversationID, pmr.userID, pmr.message)(session)
complete(OK, PostMessageResponse(pmr.message))
case Failure(_) =>
complete(BadRequestError, "Authentication Failed")
case _ => complete(InternalServerError)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment