Skip to content

Commit

Permalink
fixed some bugs in pinging
Browse files Browse the repository at this point in the history
  • Loading branch information
YaraA committed Apr 19, 2016
1 parent 00ad3a2 commit 1d6b45e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/controllers/flightsCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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) {
Expand Down

0 comments on commit 1d6b45e

Please sign in to comment.