vtb-appit 0.1.33 → 0.1.34
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 +14 -11
- package/package.json +1 -1
package/appit.js
CHANGED
|
@@ -586,19 +586,22 @@ 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
|
-
flights[i].
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
589
|
+
|
|
590
|
+
if(flights[i].flight_live_update) {
|
|
591
|
+
try {
|
|
592
|
+
let flightModel = await this.flightModel(flights[i].flight_number, flights[i].flight_departure_date);
|
|
593
|
+
if(flightModel && flightModel.success) {
|
|
594
|
+
flights[i].flight_arrival_location = flightModel.data.flight_arrival_location;
|
|
595
|
+
flights[i].flight_departure_location = flightModel.data.flight_departure_location;
|
|
596
|
+
flights[i].flight_departure_time = flightModel.data.flight_departure_time;
|
|
597
|
+
flights[i].flight_arrival_time = flightModel.data.flight_arrival_time;
|
|
598
|
+
flights[i].flight_arrival_date = flightModel.data.flight_arrival_date;
|
|
599
|
+
} else {
|
|
600
|
+
flights[i].flight_live_update = 0;
|
|
601
|
+
}
|
|
602
|
+
} catch(e) {
|
|
598
603
|
flights[i].flight_live_update = 0;
|
|
599
604
|
}
|
|
600
|
-
} catch(e) {
|
|
601
|
-
flights[i].flight_live_update = 0;
|
|
602
605
|
}
|
|
603
606
|
|
|
604
607
|
if(!id) {
|