Order photos by timestamp on website

This commit is contained in:
jvyden 2021-11-22 19:27:41 -05:00
commit 68d7433875
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -28,7 +28,12 @@ namespace LBPUnion.ProjectLighthouse.Pages
this.PageNumber = pageNumber;
this.Photos = await this.Database.Photos.Include(p => p.Creator).Skip(pageNumber * pageSize).Take(pageSize).ToListAsync();
this.Photos = await this.Database.Photos.Include
(p => p.Creator)
.OrderByDescending(p => p.Timestamp)
.Skip(pageNumber * pageSize)
.Take(pageSize)
.ToListAsync();
return this.Page();
}