mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-23 05:31:29 +00:00
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:
parent
ac192b0904
commit
bc2f385384
2 changed files with 6 additions and 4 deletions
|
@ -2,6 +2,8 @@ using LBPUnion.ProjectLighthouse.Helpers;
|
||||||
using LBPUnion.ProjectLighthouse.Serialization;
|
using LBPUnion.ProjectLighthouse.Serialization;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using LBPUnion.ProjectLighthouse.PlayerData;
|
||||||
|
using LBPUnion.ProjectLighthouse.Extensions;
|
||||||
|
|
||||||
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Controllers;
|
namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Controllers;
|
||||||
|
|
||||||
|
@ -26,7 +28,7 @@ public class StatisticsController : ControllerBase
|
||||||
[HttpGet("planetStats")]
|
[HttpGet("planetStats")]
|
||||||
public async Task<IActionResult> 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);
|
int mmPicksCount = await StatisticsHelper.TeamPickCount(this.database);
|
||||||
|
|
||||||
return this.Ok
|
return this.Ok
|
||||||
|
@ -37,5 +39,5 @@ public class StatisticsController : ControllerBase
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("planetStats/totalLevelCount")]
|
[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());
|
||||||
}
|
}
|
|
@ -11,7 +11,7 @@ namespace LBPUnion.ProjectLighthouse.Levels.Categories;
|
||||||
|
|
||||||
public class HeartedCategory : CategoryWithUser
|
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 Description { get; set; } = "Content you've hearted";
|
||||||
public override string IconHash { get; set; } = "g820611";
|
public override string IconHash { get; set; } = "g820611";
|
||||||
public override string Endpoint { get; set; } = "hearted";
|
public override string Endpoint { get; set; } = "hearted";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue