diff options
| author | crobibero <cody@robibe.ro> | 2020-08-06 08:17:45 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-08-06 08:17:45 -0600 |
| commit | fffa94fc33b923863e7cfe0d57d85ae86206975e (patch) | |
| tree | d5260738b85a67fa98969de0a87eeace2ae3cde2 /Jellyfin.Api/Controllers/VideoAttachmentsController.cs | |
| parent | 34cf1b17574e68734e7e4394cda28f5b2a36edcf (diff) | |
Apply fixes from review
Diffstat (limited to 'Jellyfin.Api/Controllers/VideoAttachmentsController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/VideoAttachmentsController.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Jellyfin.Api/Controllers/VideoAttachmentsController.cs b/Jellyfin.Api/Controllers/VideoAttachmentsController.cs index eef0a93cd..09a1c93e6 100644 --- a/Jellyfin.Api/Controllers/VideoAttachmentsController.cs +++ b/Jellyfin.Api/Controllers/VideoAttachmentsController.cs @@ -1,12 +1,11 @@ using System; +using System.ComponentModel.DataAnnotations; using System.Net.Mime; using System.Threading; using System.Threading.Tasks; -using Jellyfin.Api.Constants; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.MediaEncoding; -using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; @@ -16,7 +15,6 @@ namespace Jellyfin.Api.Controllers /// Attachments controller. /// </summary> [Route("Videos")] - [Authorize(Policy = Policies.DefaultAuthorization)] public class VideoAttachmentsController : BaseJellyfinApiController { private readonly ILibraryManager _libraryManager; @@ -49,9 +47,9 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status404NotFound)] public async Task<ActionResult<FileStreamResult>> GetAttachment( - [FromRoute] Guid videoId, - [FromRoute] string? mediaSourceId, - [FromRoute] int index) + [FromRoute, Required] Guid videoId, + [FromRoute, Required] string mediaSourceId, + [FromRoute, Required] int index) { try { |
