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
|
//TODO: parse location in body
|
||||||
Location l = new() {
|
Location l = new() {
|
||||||
X = 0,
|
X = 0,
|
||||||
Y = 0
|
Y = 0,
|
||||||
};
|
};
|
||||||
database.Locations.Add(l);
|
database.Locations.Add(l);
|
||||||
await database.SaveChangesAsync();
|
await database.SaveChangesAsync();
|
||||||
slot.LocationId = l.Id;
|
slot.LocationId = l.Id;
|
||||||
slot.CreatorId = user.UserId;
|
slot.CreatorId = user.UserId;
|
||||||
if(slot.BackgroundHash == null) slot.BackgroundHash = "";
|
|
||||||
|
|
||||||
database.Slots.Add(slot);
|
database.Slots.Add(slot);
|
||||||
await database.SaveChangesAsync();
|
await database.SaveChangesAsync();
|
||||||
|
|
|
@ -28,8 +28,6 @@ namespace ProjectLighthouse {
|
||||||
Username = username,
|
Username = username,
|
||||||
LocationId = l.Id,
|
LocationId = l.Id,
|
||||||
Biography = username + " hasn't introduced themselves yet.",
|
Biography = username + " hasn't introduced themselves yet.",
|
||||||
Pins = "",
|
|
||||||
PlanetHash = "",
|
|
||||||
};
|
};
|
||||||
this.Users.Add(user);
|
this.Users.Add(user);
|
||||||
|
|
||||||
|
|
|
@ -65,9 +65,9 @@ namespace ProjectLighthouse.Types {
|
||||||
|
|
||||||
[XmlElement("authorLabels")]
|
[XmlElement("authorLabels")]
|
||||||
public string AuthorLabels { get; set; }
|
public string AuthorLabels { get; set; }
|
||||||
|
|
||||||
[XmlElement("background")]
|
[XmlElement("background")]
|
||||||
public string BackgroundHash { get; set; }
|
public string BackgroundHash { get; set; } = "";
|
||||||
|
|
||||||
[XmlElement("minPlayers")]
|
[XmlElement("minPlayers")]
|
||||||
public int MinimumPlayers { get; set; }
|
public int MinimumPlayers { get; set; }
|
||||||
|
|
|
@ -34,12 +34,12 @@ namespace ProjectLighthouse.Types {
|
||||||
public int FavouriteSlotCount { get; set; }
|
public int FavouriteSlotCount { get; set; }
|
||||||
public int FavouriteUserCount { get; set; }
|
public int FavouriteUserCount { get; set; }
|
||||||
public int LolCatFtwCount { get; set; }
|
public int LolCatFtwCount { get; set; }
|
||||||
public string Pins { get; set; }
|
public string Pins { get; set; } = "";
|
||||||
public int StaffChallengeGoldCount { get; set; }
|
public int StaffChallengeGoldCount { get; set; }
|
||||||
public int StaffChallengeSilverCount { get; set; }
|
public int StaffChallengeSilverCount { get; set; }
|
||||||
public int StaffChallengeBronzeCount { get; set; }
|
public int StaffChallengeBronzeCount { get; set; }
|
||||||
|
|
||||||
public string PlanetHash { get; set; }
|
public string PlanetHash { get; set; } = "";
|
||||||
|
|
||||||
// [NotMapped]
|
// [NotMapped]
|
||||||
public readonly ClientsConnected ClientsConnected = new();
|
public readonly ClientsConnected ClientsConnected = new();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue