unused var

This commit is contained in:
2025-04-07 13:00:00 +01:00
parent 63d506370b
commit a708c69698

View File

@@ -27,7 +27,7 @@ class SyncWireguardRules
$output = $result->getOutput(); $output = $result->getOutput();
$commands = collect(); $commands = collect();
$server->organisation->servers()->where('id', '!=', $server->id)->each(function ($organisationServer) use (&$commands, $output, $server) { $server->organisation->servers()->where('id', '!=', $server->id)->each(function ($organisationServer) use (&$commands, $output) {
if (Str::contains($output, $organisationServer->internal_public_key)) { if (Str::contains($output, $organisationServer->internal_public_key)) {
$commands->push("wg set wg0 peer {$organisationServer->internal_public_key} remove"); $commands->push("wg set wg0 peer {$organisationServer->internal_public_key} remove");
} }
@@ -43,7 +43,7 @@ class SyncWireguardRules
]); ]);
throw new \Exception('Failed to sync WireGuard rules'); throw new \Exception('Failed to sync WireGuard rules');
} }
logger()->info('Successfully synced WireGuard rules', [ logger()->info('Successfully synced WireGuard rules', [
'server_id' => $server->id, 'server_id' => $server->id,
'commands' => $commands->toArray(), 'commands' => $commands->toArray(),