From 1432de9fe5ecf52eb3ebebc82c19c7ff7e414422 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Fri, 19 May 2023 14:39:48 +0000 Subject: [PATCH] fix: new date comparison --- app/Http/Controllers/TrackerController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/TrackerController.php b/app/Http/Controllers/TrackerController.php index b443bd2..217db2c 100644 --- a/app/Http/Controllers/TrackerController.php +++ b/app/Http/Controllers/TrackerController.php @@ -145,7 +145,7 @@ class TrackerController extends Controller // Otherwise, download the trip data from the Wayward API. if ($forceDownload) { Log::debug("Forcing download for '{$tripFileName}'."); - Storage::disk('local')->delete($tripFileName); + Storage::disk('local')->delete($tripFileName); } else { 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)); } else { $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( "Cached trip file '" . $tripFileName .