Fix timestamp order

This commit is contained in:
jvyden 2021-10-29 17:55:21 -04:00
commit 075887b63c
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
2 changed files with 2 additions and 2 deletions

View file

@ -26,7 +26,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers {
.Include(c => c.Target) .Include(c => c.Target)
.Include(c => c.Poster) .Include(c => c.Poster)
.Where(c => c.Target.Username == username) .Where(c => c.Target.Username == username)
.OrderBy(c => c.Timestamp) .OrderByDescending(c => c.Timestamp)
.ToListAsync(); .ToListAsync();
string outputXml = comments.Aggregate(string.Empty, (current, comment) => current + comment.Serialize()); string outputXml = comments.Aggregate(string.Empty, (current, comment) => current + comment.Serialize());

View file

@ -45,7 +45,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers {
IQueryable<Slot> slots = this.database.Slots IQueryable<Slot> slots = this.database.Slots
.Include(s => s.Creator) .Include(s => s.Creator)
.Include(s => s.Location) .Include(s => s.Location)
.OrderBy(s => s.FirstUploaded) .OrderByDescending(s => s.FirstUploaded)
.Skip(pageStart - 1) .Skip(pageStart - 1)
.Take(Math.Min(pageSize, 30)); .Take(Math.Min(pageSize, 30));
string response = Enumerable.Aggregate(slots, string.Empty, (current, slot) => current + slot.Serialize()); string response = Enumerable.Aggregate(slots, string.Empty, (current, slot) => current + slot.Serialize());