mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 16:38:37 +00:00
Fix hidden levels showing on slots page
This commit is contained in:
parent
ef6acbb210
commit
0e9fbfdbb7
1 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,7 @@ public class SlotsPage : BaseLayout
|
|||
this.SearchValue = name.Trim();
|
||||
|
||||
this.SlotCount = await this.Database.Slots.Include(p => p.Creator)
|
||||
.Where(p => p.Type == SlotType.User)
|
||||
.Where(p => p.Type == SlotType.User && !p.Hidden)
|
||||
.Where(p => p.Name.Contains(finalSearch.ToString()))
|
||||
.Where(p => p.Creator != null && (targetAuthor == null || string.Equals(p.Creator.Username.ToLower(), targetAuthor.ToLower())))
|
||||
.Where(p => targetGame == null || p.GameVersion == targetGame)
|
||||
|
@ -68,7 +68,7 @@ public class SlotsPage : BaseLayout
|
|||
if (this.PageNumber < 0 || this.PageNumber >= this.PageAmount) return this.Redirect($"/slots/{Math.Clamp(this.PageNumber, 0, this.PageAmount - 1)}");
|
||||
|
||||
this.Slots = await this.Database.Slots.Include(p => p.Creator)
|
||||
.Where(p => p.Type == SlotType.User)
|
||||
.Where(p => p.Type == SlotType.User && !p.Hidden)
|
||||
.Where(p => p.Name.Contains(finalSearch.ToString()))
|
||||
.Where(p => p.Creator != null && (targetAuthor == null || string.Equals(p.Creator.Username.ToLower(), targetAuthor.ToLower())))
|
||||
.Where(p => p.Creator!.LevelVisibility == PrivacyType.All) // TODO: change check for when user is logged in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue