Procházet zdrojové kódy

only set distance if available

pull/34/head
Aaron Parecki před 4 roky
rodič
revize
da66d29966
V databázi nebyl nalezen žádný známý klíč pro tento podpis GPG Key ID: 276C2817346D6056
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. +4
    -1
      compass/app/Jobs/TripComplete.php

+ 4
- 1
compass/app/Jobs/TripComplete.php Zobrazit soubor

@ -44,11 +44,14 @@ class TripComplete extends Job implements SelfHandling, ShouldQueue
'mode' => $this->_data['properties']['mode'],
'start_location' => $this->_data['properties']['start_location'],
'end_location' => $this->_data['properties']['end_location'],
'distance' => $this->_data['properties']['distance'],
'start' => $this->_data['properties']['start'],
'end' => $this->_data['properties']['end']
]
];
if(isset($this->_data['properties']['distance']))
$trip['trip']['distance'] = $this->_data['properties']['distance'];
$trip = json_encode($trip, JSON_UNESCAPED_SLASHES);
foreach($urls as $url) {

Načítá se…
Zrušit
Uložit