Enable nullable for Jellyfin.Data and remove unnecessary attributes

This commit is contained in:
Patrick Barron
2021-03-06 17:43:01 -05:00
parent 287dab4655
commit f638ee6b09
44 changed files with 93 additions and 111 deletions

View File

@@ -196,6 +196,11 @@ namespace Jellyfin.Api.Controllers
}
var user = _userManager.GetUserById(userId);
if (user?.ProfileImage == null)
{
return NoContent();
}
try
{
System.IO.File.Delete(user.ProfileImage.Path);
@@ -235,6 +240,11 @@ namespace Jellyfin.Api.Controllers
}
var user = _userManager.GetUserById(userId);
if (user?.ProfileImage == null)
{
return NoContent();
}
try
{
System.IO.File.Delete(user.ProfileImage.Path);
@@ -1469,7 +1479,7 @@ namespace Jellyfin.Api.Controllers
[FromQuery] int? imageIndex)
{
var user = _userManager.GetUserById(userId);
if (user == null)
if (user?.ProfileImage == null)
{
return NotFound();
}