dispatch an error message

This commit is contained in:
peaklabs-dev 2024-11-14 17:51:58 +01:00
parent 465dfbdf53
commit b18d4b9564
No known key found for this signature in database

View file

@ -113,7 +113,8 @@ public function syncData(bool $toModel = false)
->where('id', '!=', $this->server->id)
->exists()) {
$this->ip = $this->server->ip;
throw new \Exception('This IP/Domain is already in use by another server in your team.');
return $this->dispatch('error', 'This IP/Domain is already in use by another server in your team.');
}
$this->server->name = $this->name;