Пример #1
0
        public async Task <IActionResult> SearchAppointmentsAsync(
            [FromQuery] string searchQuery,
            CancellationToken token = default)
        {
            try
            {
                var serviceResponse = await _appointmentService.SearchAppointmentAsync(searchQuery, token);

                return(new OkObjectResult(Mapper.Map <IEnumerable <SearchAppointmentsResponseDto> >(serviceResponse)));
            }
            catch (Exception e)
            {
                return(new NotFoundResult());
            }
        }