mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-12 12:52:28 +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
|
@ -31,6 +31,8 @@ public class SlotEndpoints : ApiEndpointController
|
|||
[ProducesResponseType(typeof(List<MinimalSlot>), StatusCodes.Status200OK)]
|
||||
public async Task<IActionResult> GetSlots([FromQuery] int limit = 20, [FromQuery] int skip = 0)
|
||||
{
|
||||
if (skip < 0) skip = 0;
|
||||
if (limit < 0) limit = 0;
|
||||
limit = Math.Min(ServerStatics.PageSize, limit);
|
||||
|
||||
IEnumerable<MinimalSlot> minimalSlots = (await this.database.Slots.OrderByDescending(s => s.FirstUploaded).Skip(skip).Take(limit).ToListAsync()).Select
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue