예제 #1
0
        public List <TournamentDTO> GetTournaments(TimeRangeDTO timeRange)
        {
            CheckToken();
            List <TournamentDTO> tournamentDtos = Post <TimeRangeDTO, List <TournamentDTO> >("/api/Tournament/GetTournaments", timeRange);

            return(tournamentDtos);
        }
예제 #2
0
        public async Task <List <TournamentDTO> > GetChallonges([FromBody] TimeRangeDTO dto)
        {
            if (dto.To.HasValue | dto.From.HasValue)
            {
                var tournaments = await _service.GetTournaments(dto.From, dto.To);

                return(_mapper.Map <List <TournamentDTO> >(tournaments));
            }


            return(null);
        }