Use ArgumentException.ThrowIfNullOrEmpty

This commit is contained in:
Bond_009
2022-10-13 19:08:00 +02:00
parent 93fd462b58
commit b366dc2e6e
58 changed files with 130 additions and 549 deletions

View File

@@ -294,10 +294,7 @@ namespace Jellyfin.Api.Controllers
{
var currentSession = await RequestHelpers.GetSession(_sessionManager, _userManager, HttpContext).ConfigureAwait(false);
if (command is null)
{
throw new ArgumentException("Request body may not be null");
}
ArgumentNullException.ThrowIfNull(command, "Request body may not be null");
command.ControllingUserId = currentSession.UserId;