Update Route Controller to ensure that response is valid before parsin
This commit is contained in:
parent
b6e5f09c11
commit
c3a414285a
@ -170,10 +170,16 @@ namespace EFB.Controllers
|
||||
{
|
||||
//Get Response from Charts
|
||||
ResponseModel<ChartResponse> responseDepartureCharts = await requestDepartureCharts;
|
||||
if (responseDepartureCharts.Error == null && responseDepartureCharts.Result.Status == "success")
|
||||
{
|
||||
user.DepartureCharts = new ChartModel(responseDepartureCharts.Result.Response);
|
||||
}
|
||||
|
||||
ResponseModel<ChartResponse> responseArrivalCharts = await requestArrivalCharts;
|
||||
if (responseArrivalCharts.Error == null && responseArrivalCharts.Result.Status == "success")
|
||||
{
|
||||
user.ArrivalCharts = new ChartModel(responseArrivalCharts.Result.Response);
|
||||
}
|
||||
|
||||
//fill in route
|
||||
string finalRoute = RouteModel.ParseRoute(routeString);
|
||||
|
Loading…
Reference in New Issue
Block a user