public async Task <IActionResult> PostUnits([FromBody] SquadUnitListDto squadUnitListDto)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            var userId = int.Parse(HttpContext.User.Identity.Name);
            await _armyService.BuyUnits(userId, squadUnitListDto);

            return(Ok());
        }
        public async Task <IActionResult> PostUnits(int playerId, [FromBody] SquadUnitListDto squadUnitListDto)
        {
            var player = await _playerService.GetPlayerAsync(playerId);

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

            await _armyService.BuyUnits(player.UserId, squadUnitListDto);

            return(Ok());
        }