private async Task <PaginatedList <OppFinderSearchResult> > GetPageApprovedStandards(string searchTerm, int pageIndex)
        {
            var approvedStandardsRequest = new GetOppFinderApprovedStandardsRequest
            {
                SearchTerm    = searchTerm,
                SectorFilters = _oppFinderSession.SectorFilters,
                LevelFilters  = _oppFinderSession.LevelFilters,
                SortColumn    = _oppFinderSession.ApprovedSortColumn.ToString(),
                SortAscending = _oppFinderSession.ApprovedSortDirection == "Asc" ? 1 : 0,
                PageSize      = _oppFinderSession.ApprovedStandardsPerPage,
                PageIndex     = pageIndex,
                PageSetSize   = DefaultPageSetSize
            };

            var response = await _oppFinderApiClient.GetApprovedStandards(approvedStandardsRequest);

            return(response.Standards.Convert <OppFinderSearchResult>());
        }
Esempio n. 2
0
 public async Task <IActionResult> GetApprovedStandards([FromBody] GetOppFinderApprovedStandardsRequest request)
 {
     _logger.LogInformation($"Received request to retrieve approved standards");
     return(Ok(await _mediator.Send(request)));
 }
 public async Task <GetOppFinderApprovedStandardsResponse> GetApprovedStandards(GetOppFinderApprovedStandardsRequest approvedStandardsRequest)
 {
     using (var request = new HttpRequestMessage(HttpMethod.Post, $"/api/v1/oppfinder/approved"))
     {
         return(await PostPutRequestWithResponse <GetOppFinderApprovedStandardsRequest, GetOppFinderApprovedStandardsResponse>(request,
                                                                                                                               approvedStandardsRequest));
     }
 }