Clean up setting allocation front-end
This commit is contained in:
parent
b41e7ecf09
commit
a1c6aa6358
3 changed files with 43 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue