浏览代码

Add missing FromRoute, Required attribute

crobibero 4 年之前
父节点
当前提交
afc8a307c7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Jellyfin.Api/Controllers/LiveTvController.cs

+ 1 - 1
Jellyfin.Api/Controllers/LiveTvController.cs

@@ -447,7 +447,7 @@ namespace Jellyfin.Api.Controllers
         [HttpGet("Timers/{timerId}")]
         [HttpGet("Timers/{timerId}")]
         [ProducesResponseType(StatusCodes.Status200OK)]
         [ProducesResponseType(StatusCodes.Status200OK)]
         [Authorize(Policy = Policies.DefaultAuthorization)]
         [Authorize(Policy = Policies.DefaultAuthorization)]
-        public async Task<ActionResult<TimerInfoDto>> GetTimer(string timerId)
+        public async Task<ActionResult<TimerInfoDto>> GetTimer([FromRoute, Required] string timerId)
         {
         {
             return await _liveTvManager.GetTimer(timerId, CancellationToken.None).ConfigureAwait(false);
             return await _liveTvManager.GetTimer(timerId, CancellationToken.None).ConfigureAwait(false);
         }
         }