ui updates on server

This commit is contained in:
Andras Bacsai
2024-10-17 14:56:36 +02:00
parent 4c95647b96
commit 2315bdb93f
29 changed files with 614 additions and 373 deletions

View File

@@ -2,7 +2,7 @@
namespace App\Http\Controllers\Api;
use App\Actions\Server\RemoveServer;
use App\Actions\Server\DeleteServer;
use App\Actions\Server\ValidateServer;
use App\Enums\ProxyStatus;
use App\Enums\ProxyTypes;
@@ -726,7 +726,8 @@ class ServersController extends Controller
if ($server->definedResources()->count() > 0) {
return response()->json(['message' => 'Server has resources, so you need to delete them before.'], 400);
}
RemoveServer::dispatch($server);
$server->delete();
DeleteServer::dispatch($server);
return response()->json(['message' => 'Server deleted.']);
}