Fix email digests by removing (unused) location property

This commit is contained in:
Ben Goldsworthy 2023-01-21 20:01:11 +00:00
parent e81460781b
commit 3144511104
2 changed files with 1 additions and 9 deletions

View file

@ -232,7 +232,7 @@ class TrackerController extends Controller
array_push($points, (object)[ array_push($points, (object)[
'id' => $id++, 'id' => $id++,
'latitude' => $lat/100000, 'latitude' => $lat/100000,
'longitude'=> $lng/100000 'longitude' => $lng/100000
]); ]);
} }

View file

@ -64,14 +64,6 @@ class Digest extends Mailable
default: default:
} }
$this->locations = array_filter(
$trip->locations,
function ($elem) use ($cutoffDateTime) {
$elemDateTime = new DateTime($elem->created_at);
return $elemDateTime > $cutoffDateTime;
}
);
$this->checkinsList = array_filter( $this->checkinsList = array_filter(
$trip->checkins, $trip->checkins,
function ($elem) use ($cutoffDateTime) { function ($elem) use ($cutoffDateTime) {