diff options
| author | David <daullmer@gmail.com> | 2020-06-10 13:09:23 +0200 |
|---|---|---|
| committer | David <daullmer@gmail.com> | 2020-06-10 13:09:23 +0200 |
| commit | 1bf6c085eda59034687f24fa5b5997389aede9e5 (patch) | |
| tree | 646ec9fb8fadc68114a88d5268fe509d98b56ca1 | |
| parent | dc190e56833235c1b20fa76b8382da80fc62b0b7 (diff) | |
Move File; Move Route; use DateTime? in Query
| -rw-r--r-- | Jellyfin.Api/Controllers/ActivityLogController.cs (renamed from Jellyfin.Api/Controllers/System/ActivityLogController.cs) | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Jellyfin.Api/Controllers/System/ActivityLogController.cs b/Jellyfin.Api/Controllers/ActivityLogController.cs index f1daed2ed..8d37a8373 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 { /// <summary> /// Activity log controller. /// </summary> - [Route("/System/ActivityLog/Entries")] + [Route("/System/ActivityLog")] [Authorize(Policy = Policies.RequiresElevation)] public class ActivityLogController : BaseJellyfinApiController { @@ -36,19 +36,15 @@ namespace Jellyfin.Api.Controllers.System /// <param name="hasUserId">Optional. Only returns activities that have a user associated.</param> /// <response code="200">Activity log returned.</response> /// <returns>A <see cref="QueryResult{ActivityLogEntry}"/> containing the log entries.</returns> - [HttpGet] + [HttpGet("Entries")] [ProducesResponseType(StatusCodes.Status200OK)] public ActionResult<QueryResult<ActivityLogEntry>> 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); } } } |
