Expose visitedUrl when serializing any kind of visit, not only orphan visits

This commit is contained in:
Alejandro Celaya
2024-03-24 17:20:41 +01:00
parent d948543d5c
commit 6fe269193a
10 changed files with 40 additions and 25 deletions

View File

@@ -163,6 +163,7 @@ class Visit extends AbstractEntity implements JsonSerializable
'userAgent' => $this->userAgent,
'visitLocation' => $this->visitLocation,
'potentialBot' => $this->potentialBot,
'visitedUrl' => $this->visitedUrl,
];
if (! $this->isOrphan()) {
return $base;
@@ -170,7 +171,6 @@ class Visit extends AbstractEntity implements JsonSerializable
return [
...$base,
'visitedUrl' => $this->visitedUrl,
'type' => $this->type->value,
];
}