mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-08 04:48:44 +00:00
Use {get;set;} defaults for User and Slot
This commit is contained in:
parent
dc9b9e6f1f
commit
fcd1f25084
4 changed files with 6 additions and 9 deletions
|
@ -43,13 +43,12 @@ namespace ProjectLighthouse.Controllers {
|
|||
//TODO: parse location in body
|
||||
Location l = new() {
|
||||
X = 0,
|
||||
Y = 0
|
||||
Y = 0,
|
||||
};
|
||||
database.Locations.Add(l);
|
||||
await database.SaveChangesAsync();
|
||||
slot.LocationId = l.Id;
|
||||
slot.CreatorId = user.UserId;
|
||||
if(slot.BackgroundHash == null) slot.BackgroundHash = "";
|
||||
|
||||
database.Slots.Add(slot);
|
||||
await database.SaveChangesAsync();
|
||||
|
|
|
@ -28,8 +28,6 @@ namespace ProjectLighthouse {
|
|||
Username = username,
|
||||
LocationId = l.Id,
|
||||
Biography = username + " hasn't introduced themselves yet.",
|
||||
Pins = "",
|
||||
PlanetHash = "",
|
||||
};
|
||||
this.Users.Add(user);
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace ProjectLighthouse.Types {
|
|||
public string AuthorLabels { get; set; }
|
||||
|
||||
[XmlElement("background")]
|
||||
public string BackgroundHash { get; set; }
|
||||
public string BackgroundHash { get; set; } = "";
|
||||
|
||||
[XmlElement("minPlayers")]
|
||||
public int MinimumPlayers { get; set; }
|
||||
|
|
|
@ -34,12 +34,12 @@ namespace ProjectLighthouse.Types {
|
|||
public int FavouriteSlotCount { get; set; }
|
||||
public int FavouriteUserCount { get; set; }
|
||||
public int LolCatFtwCount { get; set; }
|
||||
public string Pins { get; set; }
|
||||
public string Pins { get; set; } = "";
|
||||
public int StaffChallengeGoldCount { get; set; }
|
||||
public int StaffChallengeSilverCount { get; set; }
|
||||
public int StaffChallengeBronzeCount { get; set; }
|
||||
|
||||
public string PlanetHash { get; set; }
|
||||
public string PlanetHash { get; set; } = "";
|
||||
|
||||
// [NotMapped]
|
||||
public readonly ClientsConnected ClientsConnected = new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue