Removed null check for body object and user [Required] attribute in replacement.

This commit is contained in:
Brian C. Arnold 2021-03-27 23:28:08 -04:00
parent f114ba57dd
commit 998833ea6e

View File

@ -321,12 +321,8 @@ namespace Jellyfin.Api.Controllers
[ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult SendMessageCommand(
[FromRoute, Required] string sessionId,
[FromBody] MessageCommand command)
[FromBody, Required] MessageCommand command)
{
if (command == null)
{
throw new ArgumentException("Request body may not be null");
}
// Need to check if message.Text is null, since [Required] can't be applied to properties of a deserialized object.
if (string.IsNullOrWhiteSpace(command.Text))