mirror of
https://github.com/v2board/v2board.git
synced 2025-02-25 14:50:26 +08:00
fix: server name repeat
This commit is contained in:
parent
e4b76a705f
commit
326fb5d918
@ -360,13 +360,13 @@ class ServerService
|
|||||||
|
|
||||||
public function serverIsExist($name):bool
|
public function serverIsExist($name):bool
|
||||||
{
|
{
|
||||||
if (ServerShadowsocks::where('name', $name)->first()) {
|
if (ServerShadowsocks::where('name', $name)->count() > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (ServerTrojan::where('name', $name)->first()) {
|
if (ServerTrojan::where('name', $name)->count() > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (Server::where('name', $name)->first()) {
|
if (Server::where('name', $name)->count() > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user