Exemple #1
0
 public void Init()
 {
     hearingsByCaseNumber = new List <VideoHearing>()
     {
         GetHearing(true)
     };
     hearingMapper = new AudioRecordedHearingsBySearchResponseMapper();
 }
        public async Task <IActionResult> SearchForHearingsAsync([FromQuery] SearchForHearingsQuery searchQuery)
        {
            var caseNumber = WebUtility.UrlDecode(searchQuery.CaseNumber);

            var query    = new GetHearingsBySearchQuery(caseNumber, searchQuery.Date);
            var hearings = await _queryHandler.Handle <GetHearingsBySearchQuery, List <VideoHearing> >(query);

            var hearingMapper = new AudioRecordedHearingsBySearchResponseMapper();
            var response      = hearingMapper.MapHearingToDetailedResponse(hearings, caseNumber);

            return(Ok(response));
        }