aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/ScheduledTasksController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-05-19 09:06:37 -0600
committercrobibero <cody@robibe.ro>2020-05-19 09:06:37 -0600
commitc998935d29d04a55babdeb0adcf1d1091611b1e3 (patch)
tree7b97eb1f40b323d5ce12d805f79437d2100060cb /Jellyfin.Api/Controllers/ScheduledTasksController.cs
parentf67daa84b04ae6c8ffcc42c038a65ecb8a433861 (diff)
Apply review suggestions
Diffstat (limited to 'Jellyfin.Api/Controllers/ScheduledTasksController.cs')
-rw-r--r--Jellyfin.Api/Controllers/ScheduledTasksController.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Jellyfin.Api/Controllers/ScheduledTasksController.cs b/Jellyfin.Api/Controllers/ScheduledTasksController.cs
index ad70bf83b..3e3359ec7 100644
--- a/Jellyfin.Api/Controllers/ScheduledTasksController.cs
+++ b/Jellyfin.Api/Controllers/ScheduledTasksController.cs
@@ -3,8 +3,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using MediaBrowser.Controller.Net;
+using Jellyfin.Api.Constants;
using MediaBrowser.Model.Tasks;
+using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding;
@@ -14,7 +15,7 @@ namespace Jellyfin.Api.Controllers
/// <summary>
/// Scheduled Tasks Controller.
/// </summary>
- // [Authenticated]
+ [Authorize(Policy = Policies.RequiresElevation)]
public class ScheduledTasksController : BaseJellyfinApiController
{
private readonly ITaskManager _taskManager;
@@ -82,8 +83,7 @@ namespace Jellyfin.Api.Controllers
return NotFound();
}
- var result = ScheduledTaskHelpers.GetTaskInfo(task);
- return Ok(result);
+ return ScheduledTaskHelpers.GetTaskInfo(task);
}
/// <summary>