mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-19 16:02:26 +00:00
Lots of bug fixes and performance improvements (#410)
* Many bug fixes and performance enhancements * Fix warnings and speed up photos with me * Finish refactoring user serialization * Finish refactoring user serialization Use GameTokens instead of User when possible Prevent negative page sizes * Fix debug compilation * Add gzip compression to example nginx config * Remove deflate changes * Add UsernameFromWebToken Co-authored-by: Jayden <jvyden@jvyden.xyz>
This commit is contained in:
parent
8dbd0e63ff
commit
d23a264b8a
43 changed files with 625 additions and 505 deletions
|
@ -5,7 +5,6 @@ using LBPUnion.ProjectLighthouse.Levels;
|
|||
using LBPUnion.ProjectLighthouse.PlayerData;
|
||||
using LBPUnion.ProjectLighthouse.PlayerData.Profiles;
|
||||
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
@ -49,7 +48,7 @@ public class SlotsPage : BaseLayout
|
|||
}
|
||||
else
|
||||
{
|
||||
finalSearch.Append(part);
|
||||
finalSearch.Append(part).Append(' ');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,6 +58,7 @@ public class SlotsPage : BaseLayout
|
|||
.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 != null && (!p.SubLevel || p.Creator == this.User))
|
||||
.Where(p => targetGame == null || p.GameVersion == targetGame)
|
||||
.CountAsync();
|
||||
|
||||
|
@ -71,6 +71,7 @@ public class SlotsPage : BaseLayout
|
|||
.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 != null && (!p.SubLevel || p.Creator == this.User))
|
||||
.Where(p => p.Creator!.LevelVisibility == PrivacyType.All) // TODO: change check for when user is logged in
|
||||
.Where(p => targetGame == null || p.GameVersion == targetGame)
|
||||
.OrderByDescending(p => p.FirstUploaded)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue