Pass default username with fallback to "Player" in NameChange script

This commit is contained in:
RattleSN4K3 2025-05-13 00:17:14 +02:00
parent cdcff1b022
commit abd8c4cfd1
5 changed files with 11 additions and 4 deletions

View file

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace LANCommander.Launcher.Data.Models;
@ -9,4 +10,8 @@ public class User : BaseModel
public string? Alias { get; set; }
public Media? Avatar { get; set; }
public Library? Library { get; set; }
[JsonIgnore]
[NotMapped]
public string? GetUserNameSafe => Alias ?? UserName;
}