fix: new date comparison
This commit is contained in:
parent
c6edbdee65
commit
1432de9fe5
1 changed files with 2 additions and 2 deletions
|
@ -145,7 +145,7 @@ class TrackerController extends Controller
|
||||||
// Otherwise, download the trip data from the Wayward API.
|
// Otherwise, download the trip data from the Wayward API.
|
||||||
if ($forceDownload) {
|
if ($forceDownload) {
|
||||||
Log::debug("Forcing download for '{$tripFileName}'.");
|
Log::debug("Forcing download for '{$tripFileName}'.");
|
||||||
Storage::disk('local')->delete($tripFileName);
|
Storage::disk('local')->delete($tripFileName);
|
||||||
} else {
|
} else {
|
||||||
Log::debug("No cached trip file found for '{$tripFileName}'.");
|
Log::debug("No cached trip file found for '{$tripFileName}'.");
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ class TrackerController extends Controller
|
||||||
Storage::disk('local')->put($tripFileName, json_encode($data));
|
Storage::disk('local')->put($tripFileName, json_encode($data));
|
||||||
} else {
|
} else {
|
||||||
$cachedData = json_decode(Storage::disk('local')->get($tripFileName));
|
$cachedData = json_decode(Storage::disk('local')->get($tripFileName));
|
||||||
if (end($data->checkins)->date !== end($cachedData->checkins)->date) {
|
if (end($data->trip->checkins)->date !== end($cachedData->trip->checkins)->date) {
|
||||||
Log::debug(
|
Log::debug(
|
||||||
"Cached trip file '" .
|
"Cached trip file '" .
|
||||||
$tripFileName .
|
$tripFileName .
|
||||||
|
|
Loading…
Reference in a new issue