Exemplo n.º 1
0
 public async Task <List <Robot> > GetRobot([FromQuery] string toSearch, [FromQuery] Guid[] guids,
                                            [FromQuery] int pagination = 50, [FromQuery] int skip = 0)
 {
     try
     {
         return(await _service.GetAllRobots(toSearch, guids.ToList(), pagination, skip));
     }
     catch (CrewApiException exception)
     {
         exception.LogException(_logger);
         return(null);
     }
     catch (Exception exception) when(exception.GetType() != typeof(CrewApiException))
     {
         _logger.LogCritical(exception, "Unhandled unexpected exception while retrieving robots");
         return(null);
     }
 }
Exemplo n.º 2
0
 public List <RobotInfo> GetAllRobots() => _robotService.GetAllRobots();