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