From 13762fc669842f3ed8eecde90939749344cfafb3 Mon Sep 17 00:00:00 2001 From: Ayymoss Date: Thu, 22 Aug 2024 19:49:02 +0100 Subject: [PATCH] Rename NetworkId to Xuid and update related references. Renamed the `NetworkId` field to `Xuid` in `ClientInfoResult.cs` and updated the data type from `long` to `string`. Adjusted the `ClientController.cs` to convert `NetworkId` to a hexadecimal `Xuid`. --- SharedLibraryCore/Dtos/ClientInfoResult.cs | 3 +-- WebfrontCore/Controllers/API/ClientController.cs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/SharedLibraryCore/Dtos/ClientInfoResult.cs b/SharedLibraryCore/Dtos/ClientInfoResult.cs index 28f90634..70af8c1e 100644 --- a/SharedLibraryCore/Dtos/ClientInfoResult.cs +++ b/SharedLibraryCore/Dtos/ClientInfoResult.cs @@ -1,5 +1,4 @@ using System; -using Data.Models; namespace SharedLibraryCore.Dtos; @@ -8,7 +7,7 @@ public class ClientInfoResult public int ClientId { get; set; } public string Name { get; set; } public string Level { get; set; } - public long NetworkId { get; set; } + public string Xuid { get; set; } public string GameName { get; set; } public string? Tag { get; set; } public DateTime FirstConnection { get; set; } diff --git a/WebfrontCore/Controllers/API/ClientController.cs b/WebfrontCore/Controllers/API/ClientController.cs index b7e7bbd6..795e679a 100644 --- a/WebfrontCore/Controllers/API/ClientController.cs +++ b/WebfrontCore/Controllers/API/ClientController.cs @@ -9,7 +9,6 @@ using System.Security.Claims; using System.Threading.Tasks; using Data.Models; -using Humanizer; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.Extensions.Logging; @@ -90,7 +89,7 @@ public async Task GetPlayerInfoAsync([FromRoute] int clientId) ClientId = clientInfo.ClientId, Name = clientInfo.CleanedName, Level = clientInfo.Level.ToLocalizedLevelName(), - NetworkId = clientInfo.NetworkId, + Xuid = clientInfo.NetworkId.ToString("X"), GameName = clientInfo.GameName.ToString(), Tag = metaResult?.Value, FirstConnection = clientInfo.FirstConnection,