StasticsHelper + Community Tab Performance Fix (#713)

* Player count shows per game

* Fixed LBP3 categories lagigng & StatisticsHelper

Co-authored-by: koko <sudokoko@users.noreply.github.com>

* Fixed "planetStats" mmPicksCount

* Hopefully the final update to this PR!
(Bug fixes)

* Update ProjectLighthouse/Types/Entities/Level/Slot.cs

Co-authored-by: koko <68549366+sudokoko@users.noreply.github.com>

* Update ProjectLighthouse.Servers.GameServer/Controllers/Slots/SlotsController.cs

I'm trusting you that nothing breaks here lol

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse.Servers.GameServer/Controllers/Slots/SlotsController.cs

bad slendy >:(

Co-authored-by: koko <68549366+sudokoko@users.noreply.github.com>

---------

Co-authored-by: koko <sudokoko@users.noreply.github.com>
Co-authored-by: koko <68549366+sudokoko@users.noreply.github.com>
Co-authored-by: Josh <josh@slendy.pw>
This commit is contained in:
W0lf4llo 2023-03-16 23:51:55 -04:00 committed by GitHub
parent 14e40de18f
commit 9b014fa01c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 19 additions and 13 deletions

View file

@ -22,14 +22,16 @@ public class StatisticsController : ControllerBase
}
[HttpGet("playersInPodCount")]
public IActionResult PlayersInPodCount() => this.Ok((StatisticsHelper.UserCountInPod(this.database)).ToString());
[HttpGet("totalPlayerCount")]
public async Task<IActionResult> TotalPlayerCount() => this.Ok((await StatisticsHelper.RecentMatches(this.database)).ToString());
public async Task<IActionResult> TotalPlayerCount() => this.Ok((await StatisticsHelper.RecentMatchesForGame(this.database, this.GetToken().GameVersion)).ToString());
[HttpGet("planetStats")]
public async Task<IActionResult> PlanetStats()
{
int totalSlotCount = await StatisticsHelper.SlotCountForGame(this.database, this.GetToken().GameVersion);
int mmPicksCount = await StatisticsHelper.TeamPickCount(this.database);
int mmPicksCount = await StatisticsHelper.TeamPickCountForGame(this.database, this.GetToken().GameVersion);
return this.Ok
(