mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-10-04 23:30:23 +00:00
Merge branch 'main' into recent-activity
This commit is contained in:
commit
27cbb14a49
7 changed files with 145 additions and 3 deletions
|
@ -173,6 +173,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)
|
||||
|
@ -194,6 +201,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