diff --git a/ProjectLighthouse/Controllers/SlotsController.cs b/ProjectLighthouse/Controllers/SlotsController.cs index 192a3d4b..01ffe886 100644 --- a/ProjectLighthouse/Controllers/SlotsController.cs +++ b/ProjectLighthouse/Controllers/SlotsController.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using LBPUnion.ProjectLighthouse.Serialization; +using LBPUnion.ProjectLighthouse.Helpers; using LBPUnion.ProjectLighthouse.Types; using LBPUnion.ProjectLighthouse.Types.Levels; using LBPUnion.ProjectLighthouse.Types.Settings; @@ -108,7 +109,23 @@ namespace LBPUnion.ProjectLighthouse.Controllers .Take(Math.Min(pageSize, 30)); string response = Enumerable.Aggregate(slots, string.Empty, (current, slot) => current + slot.Serialize()); - return this.Ok(LbpSerializer.TaggedStringElement("slots", response, "hint_start", pageStart + Math.Min(pageSize, 30))); + return this.Ok + ( + LbpSerializer.TaggedStringElement + ( + "slots", + response, + new Dictionary + { + { + "hint_start", pageStart + Math.Min(pageSize, ServerSettings.Instance.EntitledSlots) + }, + { + "total", await StatisticsHelper.SlotCount() + }, + } + ) + ); } [HttpGet("slots/mmpicks")] @@ -128,7 +145,23 @@ namespace LBPUnion.ProjectLighthouse.Controllers .Take(Math.Min(pageSize, 30)); string response = Enumerable.Aggregate(slots, string.Empty, (current, slot) => current + slot.Serialize()); - return this.Ok(LbpSerializer.TaggedStringElement("slots", response, "hint_start", pageStart + Math.Min(pageSize, 30))); + return this.Ok + ( + LbpSerializer.TaggedStringElement + ( + "slots", + response, + new Dictionary + { + { + "hint_start", pageStart + Math.Min(pageSize, ServerSettings.Instance.EntitledSlots) + }, + { + "total", await StatisticsHelper.MMPicksCount() + }, + } + ) + ); } [HttpGet("slots/lbp2luckydip")] @@ -147,8 +180,24 @@ namespace LBPUnion.ProjectLighthouse.Controllers string response = slots.Aggregate(string.Empty, (current, slot) => current + slot.Serialize()); - return this.Ok(LbpSerializer.TaggedStringElement("slots", response, "hint_start", pageStart + Math.Min(pageSize, 30))); + return this.Ok + ( + LbpSerializer.TaggedStringElement + ( + "slots", + response, + new Dictionary + { + { + "hint_start", pageStart + Math.Min(pageSize, ServerSettings.Instance.EntitledSlots) + }, + { + "total", await StatisticsHelper.SlotCount() + }, + } + ) + ); } } -} \ No newline at end of file +}