Esempio n. 1
0
 public Task <PagedResult <Tour> > GetTours(
     [FromRoute] int playerId,
     [FromQuery(Name = "id")] int[] seasonIds,
     [FromQuery] ToursQueryType queryType,
     [FromQuery] int?last,
     [FromQuery] int?size,
     [FromQuery] int?page)
 {
     return(_toursService.GetWithSeasonsAsync(playerId, seasonIds, queryType, last, size, page));
 }
Esempio n. 2
0
        public Task <PagedResult <Tour> > GetTours(
            [FromRoute] int playerId,
            [FromQuery] ToursQueryType queryType,
            [FromQuery] int?last,
            [FromQuery] int?size,
            [FromQuery] int?page)
        {
            var query = new ToursQuery(playerId, last, queryType, Array.Empty <int>(), size, page);

            return(_toursService.GetAsync(playerId, query));
        }
Esempio n. 3
0
        public async Task <PagedResult <Tour> > GetMyTours(
            [FromQuery] ToursQueryType queryType,
            [FromQuery] int?last,
            [FromQuery] int?size,
            [FromQuery] int?page)
        {
            var playerExternalId = _identityService.GetUserIdentity();
            var internalId       = (await _playersService.GetInternalIdAsync(playerExternalId)).InternalId;

            var query = new ToursQuery(internalId, last, queryType, Array.Empty <int>(), size, page);

            return(await _toursService.GetAsync(query));
        }
Esempio n. 4
0
 public ToursQuery(
     int playerId,
     int?last,
     ToursQueryType queryType,
     int[] seasonIds,
     int?size,
     int?page) : base(size, page)
 {
     PlayerId  = playerId;
     Last      = last;
     QueryType = queryType;
     SeasonIds = seasonIds;
 }
Esempio n. 5
0
        public Task <PagedResult <TourDto> > Get(
            [FromRoute] int playerId,
            [FromQuery] ToursQueryType queryType,
            [FromQuery] int last,
            [FromQuery] int size,
            [FromQuery] int page)
        {
            var query = new ToursQuery
            {
                PlayerId  = playerId,
                QueryType = queryType,
                Last      = last,
                Size      = size,
                Page      = page,
            };

            return(_mediatr.Send(query));
        }