diff --git a/public/controllers/flightsCtrl.js b/public/controllers/flightsCtrl.js index ad72e98..4ed007b 100644 --- a/public/controllers/flightsCtrl.js +++ b/public/controllers/flightsCtrl.js @@ -31,7 +31,7 @@ App.controller('flightsCtrl', function($scope, FlightsSrv, OutReturnSrv, $locati function pingAirlineR(origin, dest, oDate, rDate) { OutReturnSrv.getairLinesInfo().success(function(airlines) { airlines.forEach(function(c) { - var tclass = ($scope.cabin === "true") ? "economy" : "bussniess"; + var tclass = ($scope.cabin === "true") ? "economy" : "business"; var departDate = moment(oDate).toDate().getTime(); var outDate = moment(oDate).toDate().getTime(); var jwt = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJNWU5LU0giLCJpYXQiOjE0NjA3NzIyOTQsImV4cCI6MTQ5MjMwODI5NSwiYXVkIjoid3d3LnNlY291cnNlLmNvbSIsInN1YiI6Ik1ZTktTSCBJYmVyaWEiLCJUZWFtIjoiTVlOS1NIIn0.hZxhv8XAcu1cARgcrtfb0l_crF1-Ic1tJt9eUhIL0qQ'; @@ -49,7 +49,7 @@ App.controller('flightsCtrl', function($scope, FlightsSrv, OutReturnSrv, $locati function pingAirlineS(origin, dest, oDate) { OutReturnSrv.getairLinesInfo().success(function(airlines) { airlines.forEach(function(c) { - var tclass = ($scope.cabin === "true") ? "economy" : "bussniess"; + var tclass = ($scope.cabin === "true") ? "economy" : "business"; var departDate = moment(oDate).toDate().getTime(); jwt = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJNWU5LU0giLCJpYXQiOjE0NjA3NzIyOTQsImV4cCI6MTQ5MjMwODI5NSwiYXVkIjoid3d3LnNlY291cnNlLmNvbSIsInN1YiI6Ik1ZTktTSCBJYmVyaWEiLCJUZWFtIjoiTVlOS1NIIn0.hZxhv8XAcu1cARgcrtfb0l_crF1-Ic1tJt9eUhIL0qQ'; $http.get(c.ip + '/api/flights/search/' + origin + '/' + dest + '/' + departDate + '/' + tclass + '?wt=' + jwt).success(function(flight) {