Respect buildLabel query parameter in worldState request

This commit is contained in:
Sainan
2025-11-05 18:42:32 +01:00
parent dba84ff750
commit 268e4778c5
2 changed files with 4 additions and 1 deletions

View File

@@ -9,5 +9,8 @@ namespace WFClassic.Web.Logic.Universe.GetState
[JsonPropertyName("nonce")]
public long Nonce { get; set; }
[JsonIgnore]
public string buildLabel { get; set; }
}
}

View File

@@ -66,7 +66,7 @@ namespace WFClassic.Web.Logic.Universe.GetState
try
{
_logger.LogInformation("GetWorldStateHandler => accountId {AccountID} nonce {Nonce} => ", getWorldState.AccountId, getWorldState.Nonce);
result.GetWorldStateResultJson = GetWorldStateMapper.Map(worldStateEventMessages, worldStateAlerts,operationConfigurations, _configuration.GetValue<string>("BuildLabel"));
result.GetWorldStateResultJson = GetWorldStateMapper.Map(worldStateEventMessages, worldStateAlerts,operationConfigurations, getWorldState.buildLabel ?? _configuration.GetValue<string>("BuildLabel"));
_logger.LogInformation("GetWorldStateHandler => accountId {AccountID} nonce {Nonce} => ", getWorldState.AccountId, getWorldState.Nonce);
result.GetWorldStateResultStatus = GetWorldStateResultStatus.Success;
}