mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-03-13 00:08:14 -04:00
refactor(server): optimize server lookup with prioritized code matching
This commit is contained in:
parent
957aebd56c
commit
82ef9f3442
@ -99,6 +99,7 @@ class ServerService
|
||||
$query->where('code', $serverId)
|
||||
->orWhere('id', $serverId);
|
||||
})
|
||||
->orderByRaw('CASE WHEN code = ? THEN 0 ELSE 1 END', [$serverId])
|
||||
->first();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user