New direction; removed wireguard, readme update

This commit is contained in:
2025-09-07 11:37:52 +01:00
parent 82556535ba
commit a91780d1d5
21 changed files with 102 additions and 5622 deletions

View File

@@ -2,7 +2,6 @@
namespace App\Http\Controllers;
use App\Actions\Servers\SyncWireguardRules;
use App\Enums\ServerStatus;
use App\Events\Servers\ServerProvisioned;
use App\Models\Server;
@@ -15,7 +14,6 @@ class ProvisionCallback extends Controller
{
$validated = $request->validate([
'server_id' => ['required', 'integer', 'exists:servers,id'],
'internal_public_key' => ['required', 'string'],
]);
$server = Server::find($validated['server_id']);
@@ -41,11 +39,11 @@ class ProvisionCallback extends Controller
$server->update([
'status' => ServerStatus::ACTIVE,
'internal_public_key' => $validated['internal_public_key'],
]);
$server->organisation->servers()->each(function ($s) {
app(SyncWireguardRules::class)->onQueue()->execute($s);
// app(SyncWireguardRules::class)->onQueue()->execute($s);
// @todo change this to a sync ufw rules class
});
event(new ServerProvisioned($server));