perf(server): optimize destinationsByServer query (#7854)

This commit is contained in:
Andras Bacsai 2026-01-02 19:53:46 +01:00 committed by GitHub
commit e4e0618cea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -272,7 +272,7 @@ public static function isUsable()
public static function destinationsByServer(string $server_id)
{
$server = Server::ownedByCurrentTeam()->get()->where('id', $server_id)->firstOrFail();
$server = Server::ownedByCurrentTeam()->findOrFail($server_id);
$standaloneDocker = collect($server->standaloneDockers->all());
$swarmDocker = collect($server->swarmDockers->all());