Make all FromRoute required

This commit is contained in:
crobibero
2020-09-05 17:07:25 -06:00
parent 6d154041b9
commit 59d47ec3f5
40 changed files with 244 additions and 240 deletions

View File

@@ -64,7 +64,7 @@ namespace Jellyfin.Api.Controllers
[HttpGet("Users/{userId}/Views")]
[ProducesResponseType(StatusCodes.Status200OK)]
public ActionResult<QueryResult<BaseItemDto>> GetUserViews(
[FromRoute] Guid userId,
[FromRoute][Required] Guid userId,
[FromQuery] bool? includeExternalContent,
[FromQuery] string? presetViews,
[FromQuery] bool includeHidden = false)
@@ -126,7 +126,7 @@ namespace Jellyfin.Api.Controllers
[HttpGet("Users/{userId}/GroupingOptions")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public ActionResult<IEnumerable<SpecialViewOptionDto>> GetGroupingOptions([FromRoute] Guid userId)
public ActionResult<IEnumerable<SpecialViewOptionDto>> GetGroupingOptions([FromRoute][Required] Guid userId)
{
var user = _userManager.GetUserById(userId);
if (user == null)