mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-03 18:40:52 +08:00
fix: use ServerService::getServer() for node lookup in WebSocket
This commit is contained in:
@@ -274,7 +274,7 @@ class ServerService
|
||||
* @param string $serverType
|
||||
* @return Server|null
|
||||
*/
|
||||
public static function getServer($serverId, ?string $serverType)
|
||||
public static function getServer($serverId, ?string $serverType = null): Server | null
|
||||
{
|
||||
return Server::query()
|
||||
->when($serverType, function ($query) use ($serverType) {
|
||||
|
||||
@@ -131,7 +131,7 @@ class NodeWorker
|
||||
return;
|
||||
}
|
||||
|
||||
$node = Server::find($nodeId);
|
||||
$node = ServerService::getServer($nodeId, null);
|
||||
if (!$node) {
|
||||
$conn->close(json_encode([
|
||||
'event' => 'error',
|
||||
|
||||
Reference in New Issue
Block a user