mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 13:53:45 +02:00
Initial implementation of improved sever model and logic
This commit is contained in:
@@ -73,7 +73,7 @@ class AjaxController extends Controller
|
||||
return response()->json([], 404);
|
||||
}
|
||||
|
||||
$client = Models\Node::guzzleRequest($server->node);
|
||||
$client = Models\Node::guzzleRequest($server->node_id);
|
||||
|
||||
try {
|
||||
$res = $client->request('GET', '/server', [
|
||||
@@ -178,7 +178,7 @@ class AjaxController extends Controller
|
||||
$server = Models\Server::getByUUID($uuid);
|
||||
$this->authorize('set-connection', $server);
|
||||
|
||||
if ((int) $request->input('allocation') === $server->allocation) {
|
||||
if ((int) $request->input('allocation') === $server->allocation_id) {
|
||||
return response()->json([
|
||||
'error' => 'You are already using this as your default connection.',
|
||||
], 409);
|
||||
|
||||
Reference in New Issue
Block a user