Created
January 8, 2017 12:05
-
-
Save lucasgautheron/4c9623cd8f661455b575442353c095b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def playerSig(id: String): Action[AnyContent] = Action.async { | |
async { | |
await(fullProvider.getPlayerProfileFor(id)) match { | |
case Some(player) => | |
val build = player.build | |
views.player.Signature(interrank = | |
build.rank.flatMap(_.rank), | |
map = build.favouriteMap, | |
playername = build.user.nickname.nickname, | |
countrycode = player.build.user.countryCode, | |
ladderrank = ladderController.agg.get().ranked.find(_.user == id).map(_.rank), | |
gamecount = player.achievements.map(_.playerStatistics.gamesPlayed) | |
).result | |
case None => | |
NotFound("Player could not be found") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment