public async Task <ActionResult> PostAsync(int graphID, string town1, string town2, int maxStops) { try { RouteList routes = await _routeService.FindRoutesByGraphID(graphID, town1, town2, maxStops); if (routes.Routes.Count > 0) { return(Ok(routes)); } else { return(NotFound()); } } catch (Exception erroProcessamento) { _logger.LogError(erroProcessamento, ""); return(BadRequest()); } }