Total level count shows compatible levels instead of levels uploaded all throughout lighthouse. (#563)

* StatisticsController test & Renammed hearted cat

* Total Level Counts show all compatible levels.

* Formatted document

* Update ProjectLighthouse.Servers.GameServer/Controllers/StatisticsController.cs

Change 1

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

* Update ProjectLighthouse.Servers.GameServer/Controllers/StatisticsController.cs

Change 2

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

* Fix compilation error

Co-authored-by: Josh <josh@slendy.pw>
This commit is contained in:
W0lf4llo 2022-11-21 00:28:38 -05:00 committed by GitHub
parent ac192b0904
commit bc2f385384
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -2,6 +2,8 @@ using LBPUnion.ProjectLighthouse.Helpers;
using LBPUnion.ProjectLighthouse.Serialization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using LBPUnion.ProjectLighthouse.PlayerData;
using LBPUnion.ProjectLighthouse.Extensions;
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Controllers;
@ -26,7 +28,7 @@ public class StatisticsController : ControllerBase
[HttpGet("planetStats")]
public async Task<IActionResult> PlanetStats()
{
int totalSlotCount = await StatisticsHelper.SlotCount(this.database);
int totalSlotCount = await StatisticsHelper.SlotCountForGame(this.database, this.GetToken().GameVersion);
int mmPicksCount = await StatisticsHelper.TeamPickCount(this.database);
return this.Ok
@ -37,5 +39,5 @@ public class StatisticsController : ControllerBase
}
[HttpGet("planetStats/totalLevelCount")]
public async Task<IActionResult> TotalLevelCount() => this.Ok((await StatisticsHelper.SlotCount(this.database)).ToString());
}
public async Task<IActionResult> TotalLevelCount() => this.Ok((await StatisticsHelper.SlotCountForGame(this.database, this.GetToken().GameVersion)).ToString());
}

View file

@ -11,7 +11,7 @@ namespace LBPUnion.ProjectLighthouse.Levels.Categories;
public class HeartedCategory : CategoryWithUser
{
public override string Name { get; set; } = "My Hearted Levels";
public override string Name { get; set; } = "My Hearted Content";
public override string Description { get; set; } = "Content you've hearted";
public override string IconHash { get; set; } = "g820611";
public override string Endpoint { get; set; } = "hearted";