fix: uniqueips
This commit is contained in:
parent
93c65f6a79
commit
949407368e
@ -88,7 +88,13 @@ public function delete()
|
||||
public function submit()
|
||||
{
|
||||
$this->validate();
|
||||
|
||||
$uniqueIPs = Server::all()->reject(function (Server $server) {
|
||||
return $server->id === $this->server->id;
|
||||
})->pluck('ip')->toArray();
|
||||
if (in_array($this->server->ip, $uniqueIPs)) {
|
||||
$this->emit('error', 'IP address is already in use by another team.');
|
||||
return;
|
||||
}
|
||||
$this->server->settings->wildcard_domain = $this->wildcard_domain;
|
||||
$this->server->settings->cleanup_after_percentage = $this->cleanup_after_percentage;
|
||||
$this->server->settings->save();
|
||||
|
Loading…
Reference in New Issue
Block a user