diff --git a/Jellyfin.Api/Controllers/System/ActivityLogController.cs b/Jellyfin.Api/Controllers/ActivityLogController.cs similarity index 80% rename from Jellyfin.Api/Controllers/System/ActivityLogController.cs rename to Jellyfin.Api/Controllers/ActivityLogController.cs index f1daed2edd..8d37a83738 100644 --- a/Jellyfin.Api/Controllers/System/ActivityLogController.cs +++ b/Jellyfin.Api/Controllers/ActivityLogController.cs @@ -7,12 +7,12 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -namespace Jellyfin.Api.Controllers.System +namespace Jellyfin.Api.Controllers { /// /// Activity log controller. /// - [Route("/System/ActivityLog/Entries")] + [Route("/System/ActivityLog")] [Authorize(Policy = Policies.RequiresElevation)] public class ActivityLogController : BaseJellyfinApiController { @@ -36,19 +36,15 @@ namespace Jellyfin.Api.Controllers.System /// Optional. Only returns activities that have a user associated. /// Activity log returned. /// A containing the log entries. - [HttpGet] + [HttpGet("Entries")] [ProducesResponseType(StatusCodes.Status200OK)] public ActionResult> GetLogEntries( [FromQuery] int? startIndex, [FromQuery] int? limit, - [FromQuery] string minDate, + [FromQuery] DateTime? minDate, bool? hasUserId) { - DateTime? startDate = string.IsNullOrWhiteSpace(minDate) ? - (DateTime?)null : - DateTime.Parse(minDate, null, DateTimeStyles.RoundtripKind).ToUniversalTime(); - - return _activityManager.GetActivityLogEntries(startDate, hasUserId, startIndex, limit); + return _activityManager.GetActivityLogEntries(minDate, hasUserId, startIndex, limit); } } }