mirror of
https://github.com/BtbN/ClanServer.git
synced 2026-04-25 16:23:53 -05:00
Fix profile loading in gametop
This commit is contained in:
parent
d4e2940b00
commit
416616e4e8
|
|
@ -49,12 +49,20 @@ namespace ClanServer.Controllers.L44
|
||||||
|
|
||||||
await ctx.SaveChangesAsync();
|
await ctx.SaveChangesAsync();
|
||||||
|
|
||||||
data.Document = new XDocument(new XElement("response", new XElement("gametop",
|
try
|
||||||
new XElement("data",
|
{
|
||||||
GetInfoElement(),
|
data.Document = new XDocument(new XElement("response", new XElement("gametop",
|
||||||
await GetPlayerElement(card)
|
new XElement("data",
|
||||||
)
|
GetInfoElement(),
|
||||||
)));
|
await GetPlayerElement(card)
|
||||||
|
)
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e.ToString());
|
||||||
|
return StatusCode(500);
|
||||||
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
@ -68,6 +76,8 @@ namespace ClanServer.Controllers.L44
|
||||||
byte[] refId = player.Element("refid").Value.ToBytesFromHex();
|
byte[] refId = player.Element("refid").Value.ToBytesFromHex();
|
||||||
|
|
||||||
Card card = await ctx.Cards
|
Card card = await ctx.Cards
|
||||||
|
.Include(c => c.Player.JubeatProfile)
|
||||||
|
.ThenInclude(p => p.Jubilitys)
|
||||||
.Include(c => c.Player.JubeatProfile.ClanData)
|
.Include(c => c.Player.JubeatProfile.ClanData)
|
||||||
.Include(c => c.Player.JubeatProfile.ClanSettings)
|
.Include(c => c.Player.JubeatProfile.ClanSettings)
|
||||||
.SingleOrDefaultAsync(c => c.RefId.SequenceEqual(refId));
|
.SingleOrDefaultAsync(c => c.RefId.SequenceEqual(refId));
|
||||||
|
|
@ -75,12 +85,20 @@ namespace ClanServer.Controllers.L44
|
||||||
if (card == null || card.Player == null || card.Player.JubeatProfile == null)
|
if (card == null || card.Player == null || card.Player.JubeatProfile == null)
|
||||||
return NotFound();
|
return NotFound();
|
||||||
|
|
||||||
data.Document = new XDocument(new XElement("response", new XElement("gametop",
|
try
|
||||||
new XElement("data",
|
{
|
||||||
GetInfoElement(),
|
data.Document = new XDocument(new XElement("response", new XElement("gametop",
|
||||||
await GetPlayerElement(card)
|
new XElement("data",
|
||||||
)
|
GetInfoElement(),
|
||||||
)));
|
await GetPlayerElement(card)
|
||||||
|
)
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e.ToString());
|
||||||
|
return StatusCode(500);
|
||||||
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user