public async Task <ActionResult <AttackDto> > GetAttack() { var userId = int.Parse(HttpContext.User.Identity.Name); var attackDto = await _armyService.GetAttackDto(userId); return(Ok(attackDto)); }
public async Task <ActionResult <AttackDto> > GetAttack(int playerId) { var player = await _playerService.GetPlayerAsync(playerId); if (player == null) { return(NotFound()); } var attackDto = await _armyService.GetAttackDto(player.UserId); return(Ok(attackDto)); }