mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Clean up setting allocation front-end
This commit is contained in:
@@ -183,6 +183,12 @@ class AjaxController extends Controller
|
||||
$server = Server::getByUUID($uuid);
|
||||
$this->authorize('set-connection', $server);
|
||||
|
||||
if ($request->input('connection') === $server->ip . ':' . $server->port) {
|
||||
return response()->json([
|
||||
'error' => 'You are already using this as your default connection.'
|
||||
], 409);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
$repo = new Repositories\ServerRepository;
|
||||
|
||||
Reference in New Issue
Block a user