mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-14 05:42:27 +00:00
Fix total queued levels count on Vita
This commit is contained in:
parent
7249248e45
commit
40d7562660
1 changed files with 7 additions and 4 deletions
|
@ -53,8 +53,11 @@ public class ListController : ControllerBase
|
|||
|
||||
return this.Ok
|
||||
(
|
||||
LbpSerializer.TaggedStringElement
|
||||
("slots", response, "total", this.database.QueuedLevels.Include(q => q.User).Count(q => q.User.Username == username))
|
||||
LbpSerializer.TaggedStringElement("slots", response, new Dictionary<string, object>
|
||||
{
|
||||
{ "total", await this.database.QueuedLevels.CountAsync(q => q.UserId == token.UserId) },
|
||||
{ "hint_start", pageStart + Math.Min(pageSize, 30) },
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -136,7 +139,7 @@ public class ListController : ControllerBase
|
|||
(
|
||||
LbpSerializer.TaggedStringElement("favouriteSlots", response, new Dictionary<string, object>
|
||||
{
|
||||
{ "total", this.database.HeartedLevels.Count(q => q.UserId == targetUser.UserId) },
|
||||
{ "total", await this.database.HeartedLevels.CountAsync(q => q.UserId == targetUser.UserId) },
|
||||
{ "hint_start", pageStart + Math.Min(pageSize, 30) },
|
||||
})
|
||||
);
|
||||
|
@ -225,7 +228,7 @@ public class ListController : ControllerBase
|
|||
(
|
||||
LbpSerializer.TaggedStringElement("favouriteUsers", response, new Dictionary<string, object>
|
||||
{
|
||||
{ "total", this.database.HeartedProfiles.Count(q => q.UserId == targetUser.UserId) },
|
||||
{ "total", await this.database.HeartedProfiles.CountAsync(q => q.UserId == targetUser.UserId) },
|
||||
{ "hint_start", pageStart + Math.Min(pageSize, 30) },
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue