refactor(events): update ProxyStatusChangedUI constructor to accept nullable teamId for improved flexibility

This commit is contained in:
Andras Bacsai
2025-06-10 10:58:56 +02:00
parent 433dcdbe78
commit 4dc0254e62

View File

@@ -14,7 +14,7 @@ class ProxyStatusChangedUI implements ShouldBroadcast
public ?int $teamId = null; public ?int $teamId = null;
public function __construct(int $teamId) public function __construct(?int $teamId = null)
{ {
if (is_null($teamId) && auth()->check() && auth()->user()->currentTeam()) { if (is_null($teamId) && auth()->check() && auth()->user()->currentTeam()) {
$teamId = auth()->user()->currentTeam()->id; $teamId = auth()->user()->currentTeam()->id;