Include hint_start in hearted slots and users

This commit is contained in:
jvyden 2022-08-04 15:41:17 -04:00
parent 6c989e7923
commit e5028c870d
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -117,8 +117,11 @@ public class ListController : ControllerBase
return this.Ok
(
LbpSerializer.TaggedStringElement
("favouriteSlots", response, "total", this.database.HeartedLevels.Include(q => q.User).Count(q => q.User.Username == username))
LbpSerializer.TaggedStringElement("favouriteSlots", response, new Dictionary<string, object>
{
{ "total", this.database.HeartedLevels.Include(q => q.User).Count(q => q.User.Username == username) },
{ "hint_start", pageStart + Math.Min(pageSize, 30) },
})
);
}
@ -175,8 +178,11 @@ public class ListController : ControllerBase
return this.Ok
(
LbpSerializer.TaggedStringElement
("favouriteUsers", response, "total", this.database.HeartedProfiles.Include(q => q.User).Count(q => q.User.Username == username))
LbpSerializer.TaggedStringElement("favouriteUsers", response, new Dictionary<string, object>
{
{ "total", this.database.HeartedProfiles.Include(q => q.User).Count(q => q.User.Username == username) },
{ "hint_start", pageStart + Math.Min(pageSize, 30) },
})
);
}