public async Task <IActionResult> Update([FromBody] LeaderboardRequest leaderboard)
 {
     if ((await _authorizationService.AuthorizeAsync(User, leaderboard.GameId, HttpContext.ScopeItems(ClaimScope.Game))).Succeeded)
     {
         var leaderboardModel = leaderboard.ToModel();
         _leaderboardController.Update(leaderboardModel);
         return(Ok());
     }
     return(Forbid());
 }
 public async Task <IActionResult> Create([FromBody] LeaderboardRequest newLeaderboard)
 {
     if ((await _authorizationService.AuthorizeAsync(User, newLeaderboard.GameId, HttpContext.ScopeItems(ClaimScope.Game))).Succeeded)
     {
         var leaderboard = newLeaderboard.ToModel();
         _leaderboardController.Create(leaderboard);
         var leaderboardContract = leaderboard.ToContract();
         return(new ObjectResult(leaderboardContract));
     }
     return(Forbid());
 }