mirror of
https://github.com/MikuLeaks/KianaBH3.git
synced 2025-12-12 13:04:33 +01:00
fix query dispatch & gateway
This commit is contained in:
@@ -13,9 +13,10 @@ public class QueryDispatchController : ControllerBase
|
||||
public IActionResult QueryDispatch([FromQuery] DispatchQuery query, Logger logger)
|
||||
{
|
||||
var version = HotfixContainer.ExtractVersionNumber(query.Version);
|
||||
if (!ConfigManager.Hotfix.Hotfixes.ContainsKey(version))
|
||||
var hotfix_version = query.Version!;
|
||||
if (!ConfigManager.Hotfix.Hotfixes.ContainsKey(hotfix_version))
|
||||
{
|
||||
logger.Warn($"Client sent requesting unsupported game version: {version}");
|
||||
logger.Warn($"Client sent requesting unsupported game version: {hotfix_version}");
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,10 +14,11 @@ public class QueryGatewayController : ControllerBase
|
||||
public IActionResult QueryGateway([FromQuery] DispatchQuery query, Logger logger)
|
||||
{
|
||||
var version = HotfixContainer.ExtractVersionNumber(query.Version);
|
||||
var hotfix_version = query.Version!;
|
||||
|
||||
if (!ConfigManager.Hotfix.Hotfixes.TryGetValue(version, out var hotfix))
|
||||
if (!ConfigManager.Hotfix.Hotfixes.TryGetValue(hotfix_version, out var hotfix))
|
||||
{
|
||||
logger.Warn($"Client sent requesting unsupported game version: {version}");
|
||||
logger.Warn($"Client sent requesting unsupported game version: {hotfix_version}");
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user