mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-10-04 07:09:58 +00:00
Resolve most warnings & suggestions
This commit is contained in:
parent
41253b59f5
commit
5e27f8c29b
23 changed files with 150 additions and 108 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue