mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-02 10:08:39 +00:00
Send missing total parameter on some slot categories
This commit is contained in:
parent
5450822291
commit
31ad1ccfcd
1 changed files with 51 additions and 3 deletions
|
@ -244,7 +244,23 @@ public class SlotsController : ControllerBase
|
||||||
|
|
||||||
string response = slots.Aggregate(string.Empty, (current, slot) => current + slot.Serialize());
|
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<string, object>
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"hint_start", pageStart + Math.Min(pageSize, ServerSettings.Instance.EntitledSlots)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"total", await StatisticsHelper.SlotCount()
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("slots/mostUniquePlays")]
|
[HttpGet("slots/mostUniquePlays")]
|
||||||
|
@ -286,7 +302,23 @@ public class SlotsController : ControllerBase
|
||||||
|
|
||||||
string response = slots.Aggregate(string.Empty, (current, slot) => current + slot.Serialize());
|
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<string, object>
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"hint_start", pageStart + Math.Min(pageSize, ServerSettings.Instance.EntitledSlots)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"total", await StatisticsHelper.SlotCount()
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("slots/mostHearted")]
|
[HttpGet("slots/mostHearted")]
|
||||||
|
@ -314,7 +346,23 @@ public class SlotsController : ControllerBase
|
||||||
|
|
||||||
string response = slots.Aggregate(string.Empty, (current, slot) => current + slot.Serialize());
|
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<string, object>
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"hint_start", pageStart + Math.Min(pageSize, ServerSettings.Instance.EntitledSlots)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"total", await StatisticsHelper.SlotCount()
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameVersion GetGameFilter(string? gameFilterType, GameVersion version)
|
public GameVersion GetGameFilter(string? gameFilterType, GameVersion version)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue