diff --git a/app/Services/ServerService.php b/app/Services/ServerService.php index 27e9bef..d63aa1c 100644 --- a/app/Services/ServerService.php +++ b/app/Services/ServerService.php @@ -99,6 +99,7 @@ class ServerService $query->where('code', $serverId) ->orWhere('id', $serverId); }) + ->orderByRaw('CASE WHEN code = ? THEN 0 ELSE 1 END', [$serverId]) ->first(); } }