Resolve most warnings & suggestions

This commit is contained in:
jvyden 2021-11-18 14:42:24 -05:00
commit 5e27f8c29b
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
23 changed files with 150 additions and 108 deletions

View file

@ -82,7 +82,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers
{
User? userFromQuery = await this.database.Users.FirstOrDefaultAsync(u => u.Username == user);
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
if (user == null) return this.NotFound();
if (userFromQuery == null) return this.NotFound();
List<Photo> photos = await this.database.Photos.Include
(p => p.Creator)
@ -100,7 +100,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers
{
User? userFromQuery = await this.database.Users.FirstOrDefaultAsync(u => u.Username == user);
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
if (user == null) return this.NotFound();
if (userFromQuery == null) return this.NotFound();
List<Photo> photos = new();
foreach (Photo photo in this.database.Photos.Include(p => p.Creator))