Add ability to hide levels

This commit is contained in:
jvyden 2022-08-05 21:34:43 -04:00
parent 0d7d8c25f3
commit ef6acbb210
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
11 changed files with 106 additions and 32 deletions

View file

@ -42,15 +42,18 @@ public class LandingPage : BaseLayout
const int maxShownLevels = 5;
this.LatestTeamPicks = await this.Database.Slots.Where
(s => s.Type == SlotType.User)
this.LatestTeamPicks = await this.Database.Slots.Where(s => s.Type == SlotType.User && s.Type == SlotType.User)
.Where(s => s.TeamPick)
.OrderByDescending(s => s.FirstUploaded)
.Take(maxShownLevels)
.Include(s => s.Creator)
.ToListAsync();
this.NewestLevels = await this.Database.Slots.Where(s => s.Type == SlotType.User).OrderByDescending(s => s.FirstUploaded).Take(maxShownLevels).Include(s => s.Creator).ToListAsync();
this.NewestLevels = await this.Database.Slots.Where(s => s.Type == SlotType.User && s.Type == SlotType.User)
.OrderByDescending(s => s.FirstUploaded)
.Take(maxShownLevels)
.Include(s => s.Creator)
.ToListAsync();
return this.Page();
}