Skip to content

Instantly share code, notes, and snippets.

@borlaym
Created June 18, 2019 19:56
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 borlaym/c9f42091555e81dbe0e6536b72696b6c to your computer and use it in GitHub Desktop.
Save borlaym/c9f42091555e81dbe0e6536b72696b6c to your computer and use it in GitHub Desktop.
def addGame(gameId: Long) = Action.async { implicit request =>
request.body.asJson.map{json =>
for {
players <- json \ "players"
} yield Ok()
}.getOrElse(Future(BadRequest())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment