From d70b9a8f8292fc147ce77c6f7d1b1d53467febc9 Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 13 Apr 2022 22:43:14 -0500 Subject: [PATCH] Fix include slot location and creator arg (#285) --- .../Controllers/GameApi/Slots/SlotsController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ProjectLighthouse/Controllers/GameApi/Slots/SlotsController.cs b/ProjectLighthouse/Controllers/GameApi/Slots/SlotsController.cs index a9aff2f3..fbcd2e66 100644 --- a/ProjectLighthouse/Controllers/GameApi/Slots/SlotsController.cs +++ b/ProjectLighthouse/Controllers/GameApi/Slots/SlotsController.cs @@ -39,7 +39,7 @@ public class SlotsController : ControllerBase string response = Enumerable.Aggregate ( - this.database.Slots.ByGameVersion(gameVersion, token.UserId == user.UserId) + this.database.Slots.ByGameVersion(gameVersion, token.UserId == user.UserId, true) .Where(s => s.Creator!.Username == user.Username) .Skip(pageStart - 1) .Take(Math.Min(pageSize, ServerSettings.Instance.EntitledSlots)), @@ -77,7 +77,7 @@ public class SlotsController : ControllerBase GameVersion gameVersion = token.GameVersion; - Slot? slot = await this.database.Slots.ByGameVersion(gameVersion, true).FirstOrDefaultAsync(s => s.SlotId == id); + Slot? slot = await this.database.Slots.ByGameVersion(gameVersion, true, true).FirstOrDefaultAsync(s => s.SlotId == id); if (slot == null) return this.NotFound(); @@ -403,4 +403,4 @@ public class SlotsController : ControllerBase return whereSlots.Include(s => s.Creator).Include(s => s.Location); } -} \ No newline at end of file +}