Skip to content

Instantly share code, notes, and snippets.

@tiqwab
Created March 12, 2019 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiqwab/ee77c33c1f8263eb2551b3c429a96780 to your computer and use it in GitHub Desktop.
Save tiqwab/ee77c33c1f8263eb2551b3c429a96780 to your computer and use it in GitHub Desktop.
(for {
conn <- withConnection
currentIssue <- findIssueById(editReq.id)(conn)
_ <- isIssueEditable(currentIssue)(BadRequest)
_ <- updateIssue(editReq.id, editReq.content)
} yield Ok("ok")).run(Future.successful)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment