mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-28 07:58:40 +00:00
Fix include slot location and creator arg (#285)
This commit is contained in:
parent
9f6517dbe5
commit
d70b9a8f82
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue