diff options
| author | Patrick Barron <18354464+barronpm@users.noreply.github.com> | 2020-08-07 18:08:12 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-07 18:08:12 +0000 |
| commit | a15be774ac606ec71f3ab0849a56ae08b8cc2f4d (patch) | |
| tree | 590a56ca843635f9e353b598b1182d84bf6a9bd4 /Jellyfin.Api/Controllers/EnvironmentController.cs | |
| parent | 34cf1b17574e68734e7e4394cda28f5b2a36edcf (diff) | |
| parent | e735ab6cc0faaec61d6aceeb0b946ba94a8c103c (diff) | |
Merge pull request #3833 from crobibero/api-cleanup-v3
api-migration review fixes
Diffstat (limited to 'Jellyfin.Api/Controllers/EnvironmentController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/EnvironmentController.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Jellyfin.Api/Controllers/EnvironmentController.cs b/Jellyfin.Api/Controllers/EnvironmentController.cs index 719bb7d86..64670f7d8 100644 --- a/Jellyfin.Api/Controllers/EnvironmentController.cs +++ b/Jellyfin.Api/Controllers/EnvironmentController.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.IO; using System.Linq; using Jellyfin.Api.Constants; @@ -8,7 +9,6 @@ using MediaBrowser.Model.IO; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Logging; namespace Jellyfin.Api.Controllers @@ -47,7 +47,7 @@ namespace Jellyfin.Api.Controllers [HttpGet("DirectoryContents")] [ProducesResponseType(StatusCodes.Status200OK)] public IEnumerable<FileSystemEntryInfo> GetDirectoryContents( - [FromQuery, BindRequired] string path, + [FromQuery, Required] string path, [FromQuery] bool includeFiles = false, [FromQuery] bool includeDirectories = false) { @@ -75,7 +75,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("ValidatePath")] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status404NotFound)] - public ActionResult ValidatePath([FromBody, BindRequired] ValidatePathDto validatePathDto) + public ActionResult ValidatePath([FromBody, Required] ValidatePathDto validatePathDto) { if (validatePathDto.IsFile.HasValue) { @@ -154,7 +154,7 @@ namespace Jellyfin.Api.Controllers /// <returns>Parent path.</returns> [HttpGet("ParentPath")] [ProducesResponseType(StatusCodes.Status200OK)] - public ActionResult<string?> GetParentPath([FromQuery, BindRequired] string path) + public ActionResult<string?> GetParentPath([FromQuery, Required] string path) { string? parent = Path.GetDirectoryName(path); if (string.IsNullOrEmpty(parent)) |
