Merge pull request #3579 from crobibero/activity-log-userid
Add UserId filter to ActivityLog Entries endpoint
This commit is contained in:
commit
f9d4b0a2d7
|
@ -56,7 +56,10 @@ namespace MediaBrowser.Api.System
|
|||
DateTime.Parse(request.MinDate, null, DateTimeStyles.RoundtripKind).ToUniversalTime();
|
||||
|
||||
var filterFunc = new Func<IQueryable<ActivityLog>, IQueryable<ActivityLog>>(
|
||||
entries => entries.Where(entry => entry.DateCreated >= minDate));
|
||||
entries => entries.Where(entry => entry.DateCreated >= minDate
|
||||
&& (!request.HasUserId.HasValue || (request.HasUserId.Value
|
||||
? entry.UserId != Guid.Empty
|
||||
: entry.UserId == Guid.Empty))));
|
||||
|
||||
var result = _activityManager.GetPagedResult(filterFunc, request.StartIndex, request.Limit);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user