aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/YearsController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-09-06 14:34:31 -0600
committercrobibero <cody@robibe.ro>2020-09-06 14:34:31 -0600
commiteab92a0b0124c2e89a8e11d4d6a8031f17834e36 (patch)
treed86b3903849cbff19c3a11198bc2e14a6607c18e /Jellyfin.Api/Controllers/YearsController.cs
parentd5eb246557f9c943d8e3c5ddcc357ef351425deb (diff)
parent99bbbea9e24d3e34041fdd97f9f9efa0dad58c9a (diff)
Merge remote-tracking branch 'upstream/master' into api-stream-return
Diffstat (limited to 'Jellyfin.Api/Controllers/YearsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/YearsController.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/YearsController.cs b/Jellyfin.Api/Controllers/YearsController.cs
index eb91ac23e..4ecf0407b 100644
--- a/Jellyfin.Api/Controllers/YearsController.cs
+++ b/Jellyfin.Api/Controllers/YearsController.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
using System.Linq;
using Jellyfin.Api.Constants;
using Jellyfin.Api.Extensions;
@@ -179,7 +180,7 @@ namespace Jellyfin.Api.Controllers
[HttpGet("{year}")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
- public ActionResult<BaseItemDto> GetYear([FromRoute] int year, [FromQuery] Guid? userId)
+ public ActionResult<BaseItemDto> GetYear([FromRoute, Required] int year, [FromQuery] Guid? userId)
{
var item = _libraryManager.GetYear(year);
if (item == null)