diff --git a/ProjectLighthouse/Pages/PhotosPage.cshtml.cs b/ProjectLighthouse/Pages/PhotosPage.cshtml.cs index f3e7983f..96f7ba70 100644 --- a/ProjectLighthouse/Pages/PhotosPage.cshtml.cs +++ b/ProjectLighthouse/Pages/PhotosPage.cshtml.cs @@ -39,8 +39,7 @@ public class PhotosPage : BaseLayout if (this.PageNumber < 0 || this.PageNumber >= this.PageAmount) return this.Redirect($"/photos/{Math.Clamp(this.PageNumber, 0, this.PageAmount - 1)}"); - this.Photos = await this.Database.Photos.Include - (p => p.Creator) + this.Photos = await this.Database.Photos.Include(p => p.Creator) .Where(p => p.Creator.Username.Contains(name) || p.PhotoSubjectCollection.Contains(name)) .OrderByDescending(p => p.Timestamp) .Skip(pageNumber * ServerStatics.PageSize) diff --git a/ProjectLighthouse/Pages/SlotsPage.cshtml.cs b/ProjectLighthouse/Pages/SlotsPage.cshtml.cs index 3ee865f1..48c030c0 100644 --- a/ProjectLighthouse/Pages/SlotsPage.cshtml.cs +++ b/ProjectLighthouse/Pages/SlotsPage.cshtml.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using JetBrains.Annotations; -using LBPUnion.ProjectLighthouse.Helpers; using LBPUnion.ProjectLighthouse.Pages.Layouts; using LBPUnion.ProjectLighthouse.Types.Levels; using LBPUnion.ProjectLighthouse.Types.Settings; @@ -37,12 +36,12 @@ public class SlotsPage : BaseLayout this.SearchValue = name; this.PageNumber = pageNumber; - this.PageAmount = Math.Max(1, (int) Math.Ceiling((double) this.SlotCount / ServerStatics.PageSize)); + this.PageAmount = Math.Max(1, (int)Math.Ceiling((double)this.SlotCount / ServerStatics.PageSize)); 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.Where - (p => p.Name.Contains(name)) + this.Slots = await this.Database.Slots.Include(p => p.Creator) + .Where(p => p.Name.Contains(name)) .OrderByDescending(p => p.FirstUploaded) .Skip(pageNumber * ServerStatics.PageSize) .Take(ServerStatics.PageSize) diff --git a/ProjectLighthouse/Pages/UsersPage.cshtml.cs b/ProjectLighthouse/Pages/UsersPage.cshtml.cs index 9290033c..e5d7ebcc 100644 --- a/ProjectLighthouse/Pages/UsersPage.cshtml.cs +++ b/ProjectLighthouse/Pages/UsersPage.cshtml.cs @@ -39,8 +39,7 @@ public class UsersPage : BaseLayout if (this.PageNumber < 0 || this.PageNumber >= this.PageAmount) return this.Redirect($"/users/{Math.Clamp(this.PageNumber, 0, this.PageAmount - 1)}"); - this.Users = await this.Database.Users.Where - (u => !u.Banned && u.Username.Contains(name)) + this.Users = await this.Database.Users.Where(u => !u.Banned && u.Username.Contains(name)) .OrderByDescending(b => b.UserId) .Skip(pageNumber * ServerStatics.PageSize) .Take(ServerStatics.PageSize)