Skip to content

Commit

Permalink
Rename NetworkId to Xuid and update related references.
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
Ayymoss committed Aug 22, 2024
1 parent 1a3076b commit 13762fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions SharedLibraryCore/Dtos/ClientInfoResult.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Data.Models;

namespace SharedLibraryCore.Dtos;

Expand All @@ -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; }

Check warning on line 12 in SharedLibraryCore/Dtos/ClientInfoResult.cs

View workflow job for this annotation

GitHub Actions / build_pack

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 12 in SharedLibraryCore/Dtos/ClientInfoResult.cs

View workflow job for this annotation

GitHub Actions / build_pack

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 12 in SharedLibraryCore/Dtos/ClientInfoResult.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 12 in SharedLibraryCore/Dtos/ClientInfoResult.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 12 in SharedLibraryCore/Dtos/ClientInfoResult.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
public DateTime FirstConnection { get; set; }
Expand Down
3 changes: 1 addition & 2 deletions WebfrontCore/Controllers/API/ClientController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -90,7 +89,7 @@ public async Task<IActionResult> 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,
Expand Down

0 comments on commit 13762fc

Please sign in to comment.