vtb-appit 0.1.31 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/appit.js +12 -8
- package/package.json +1 -1
package/appit.js
CHANGED
|
@@ -586,14 +586,18 @@ class Appit {
|
|
|
586
586
|
let flight = this.clean(JSON.parse(JSON.stringify(flights[i])));
|
|
587
587
|
const flightData = {...flight, excursion_id: this.history.excursionId};
|
|
588
588
|
let id = this.findId('flights', flights[i].object_id);
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
589
|
+
try {
|
|
590
|
+
let flightModel = await this.flightModel(flights[i].flight_number, flights[i].flight_departure_date);
|
|
591
|
+
if(flightModel && flightModel.success) {
|
|
592
|
+
flights[i].flight_arrival_location = flightModel.data.flight_arrival_location;
|
|
593
|
+
flights[i].flight_departure_location = flightModel.data.flight_departure_location;
|
|
594
|
+
flights[i].flight_departure_time = flightModel.data.flight_departure_time;
|
|
595
|
+
flights[i].flight_arrival_time = flightModel.data.flight_arrival_time;
|
|
596
|
+
flights[i].flight_arrival_date = flightModel.data.flight_arrival_date;
|
|
597
|
+
} else {
|
|
598
|
+
flights[i].flight_live_update = 0;
|
|
599
|
+
}
|
|
600
|
+
} catch(e) {
|
|
597
601
|
flights[i].flight_live_update = 0;
|
|
598
602
|
}
|
|
599
603
|
|