mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-28 07:58:40 +00:00
Prevent LBP3 reviews from showing up in LBP2 (#1015)
This commit is contained in:
parent
0ce748de8f
commit
ed5bb5d769
2 changed files with 113 additions and 0 deletions
|
@ -157,6 +157,13 @@ public class ReviewController : ControllerBase
|
|||
|
||||
List<GameReview> reviews = (await this.database.Reviews
|
||||
.Where(r => r.SlotId == slotId)
|
||||
.Select(r => new
|
||||
{
|
||||
Review = r,
|
||||
SlotVersion = r.Slot!.GameVersion,
|
||||
})
|
||||
.Where(a => a.SlotVersion <= token.GameVersion)
|
||||
.Select(a => a.Review)
|
||||
.OrderByDescending(r => r.ThumbsUp - r.ThumbsDown)
|
||||
.ThenByDescending(r => r.Timestamp)
|
||||
.ApplyPagination(pageData)
|
||||
|
@ -178,6 +185,13 @@ public class ReviewController : ControllerBase
|
|||
|
||||
List<GameReview> reviews = (await this.database.Reviews
|
||||
.Where(r => r.ReviewerId == targetUserId)
|
||||
.Select(r => new
|
||||
{
|
||||
Review = r,
|
||||
SlotVersion = r.Slot!.GameVersion,
|
||||
})
|
||||
.Where(a => a.SlotVersion <= token.GameVersion)
|
||||
.Select(a => a.Review)
|
||||
.OrderByDescending(r => r.Timestamp)
|
||||
.ApplyPagination(pageData)
|
||||
.ToListAsync()).ToSerializableList(r => GameReview.CreateFromEntity(r, token));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue