aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/ImageByNameController.cs
diff options
context:
space:
mode:
authorPatrick Barron <18354464+barronpm@users.noreply.github.com>2020-08-07 18:08:12 +0000
committerGitHub <noreply@github.com>2020-08-07 18:08:12 +0000
commita15be774ac606ec71f3ab0849a56ae08b8cc2f4d (patch)
tree590a56ca843635f9e353b598b1182d84bf6a9bd4 /Jellyfin.Api/Controllers/ImageByNameController.cs
parent34cf1b17574e68734e7e4394cda28f5b2a36edcf (diff)
parente735ab6cc0faaec61d6aceeb0b946ba94a8c103c (diff)
Merge pull request #3833 from crobibero/api-cleanup-v3
api-migration review fixes
Diffstat (limited to 'Jellyfin.Api/Controllers/ImageByNameController.cs')
-rw-r--r--Jellyfin.Api/Controllers/ImageByNameController.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/Jellyfin.Api/Controllers/ImageByNameController.cs b/Jellyfin.Api/Controllers/ImageByNameController.cs
index 5244c35b8..528590536 100644
--- a/Jellyfin.Api/Controllers/ImageByNameController.cs
+++ b/Jellyfin.Api/Controllers/ImageByNameController.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Linq;
using System.Net.Mime;
@@ -64,7 +65,7 @@ namespace Jellyfin.Api.Controllers
[Produces(MediaTypeNames.Application.Octet)]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
- public ActionResult<FileStreamResult> GetGeneralImage([FromRoute] string? name, [FromRoute] string? type)
+ public ActionResult<FileStreamResult> GetGeneralImage([FromRoute, Required] string? name, [FromRoute, Required] string? type)
{
var filename = string.Equals(type, "primary", StringComparison.OrdinalIgnoreCase)
? "folder"
@@ -110,8 +111,8 @@ namespace Jellyfin.Api.Controllers
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public ActionResult<FileStreamResult> GetRatingImage(
- [FromRoute] string? theme,
- [FromRoute] string? name)
+ [FromRoute, Required] string? theme,
+ [FromRoute, Required] string? name)
{
return GetImageFile(_applicationPaths.RatingsPath, theme, name);
}
@@ -143,8 +144,8 @@ namespace Jellyfin.Api.Controllers
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public ActionResult<FileStreamResult> GetMediaInfoImage(
- [FromRoute] string? theme,
- [FromRoute] string? name)
+ [FromRoute, Required] string? theme,
+ [FromRoute, Required] string? name)
{
return GetImageFile(_applicationPaths.MediaInfoImagesPath, theme, name);
}