aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/SessionController.cs
diff options
context:
space:
mode:
authorBrian C. Arnold <connect@brian-arnold.dev>2021-03-27 23:28:08 -0400
committerBrian C. Arnold <connect@brian-arnold.dev>2021-03-27 23:29:24 -0400
commit998833ea6e4c52f842949029b278008b276e3e6b (patch)
treeaf97bd6c3752a64de90f8cfb74da96eccbc7359e /Jellyfin.Api/Controllers/SessionController.cs
parentf114ba57dd24ed38786a478df7a641f81dd9d5c7 (diff)
Removed null check for body object and user [Required] attribute in replacement.
Diffstat (limited to 'Jellyfin.Api/Controllers/SessionController.cs')
-rw-r--r--Jellyfin.Api/Controllers/SessionController.cs6
1 files changed, 1 insertions, 5 deletions
diff --git a/Jellyfin.Api/Controllers/SessionController.cs b/Jellyfin.Api/Controllers/SessionController.cs
index 82aa32a7a..34dfb6ce7 100644
--- a/Jellyfin.Api/Controllers/SessionController.cs
+++ b/Jellyfin.Api/Controllers/SessionController.cs
@@ -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))