Cleanup code

This commit is contained in:
jvyden 2021-12-11 14:33:28 -05:00
commit b0b9ad2172
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
58 changed files with 310 additions and 424 deletions

View file

@ -114,10 +114,8 @@ namespace LBPUnion.ProjectLighthouse.Controllers
if (userFromQuery == null) return this.NotFound();
List<Photo> photos = new();
foreach (Photo photo in this.database.Photos.Include(p => p.Creator))
{
photos.AddRange(photo.Subjects.Where(subject => subject.User.UserId == userFromQuery.UserId).Select(_ => photo));
}
foreach (Photo photo in this.database.Photos.Include
(p => p.Creator)) photos.AddRange(photo.Subjects.Where(subject => subject.User.UserId == userFromQuery.UserId).Select(_ => photo));
string response = photos.OrderByDescending
(s => s.Timestamp)