mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-14 11:20:53 +08:00
feat: add v2node support
This commit is contained in:
@@ -98,10 +98,12 @@ class ServerService
|
||||
* @param string $serverType
|
||||
* @return Server|null
|
||||
*/
|
||||
public static function getServer($serverId, $serverType)
|
||||
public static function getServer($serverId, ?string $serverType)
|
||||
{
|
||||
return Server::query()
|
||||
->where('type', Server::normalizeType($serverType))
|
||||
->when($serverType, function ($query) use ($serverType) {
|
||||
$query->where('type', Server::normalizeType($serverType));
|
||||
})
|
||||
->where(function ($query) use ($serverId) {
|
||||
$query->where('code', $serverId)
|
||||
->orWhere('id', $serverId);
|
||||
|
||||
Reference in New Issue
Block a user