Esempio n. 1
0
        public async Task <IActionResult> GetSessionData()
        {
            var identity = HttpContext.User.Identity as ClaimsIdentity;
            int playerId = int.Parse(identity.FindFirst(ClaimTypes.NameIdentifier).Value);
            var gameSessionDataResponse = await _gameSessionService.GetGameSessionDataByOwnerId(playerId);

            if (gameSessionDataResponse == null)
            {
                return(NotFound());
            }

            return(Ok(gameSessionDataResponse));
        }