mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-15 21:43:03 +03:00
Enable nullable for Jellyfin.Data and remove unnecessary attributes
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user