File tree Expand file tree Collapse file tree
src/XtremeIdiots.Portal.Repository.Api.V1/Controllers/V1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ async Task<ApiResult<ServerOverviewDto>> IServerAnalyticsApi.GetOverview(Guid ga
9191 . AsNoTracking ( )
9292 . CountAsync ( r => r . GameServerId == gameServerId && r . Timestamp >= fromUtc && r . Timestamp < toUtc , cancellationToken ) . ConfigureAwait ( false ) ;
9393
94- var correlationWindow = TimeSpan . FromHours ( 6 ) ;
94+ const double correlationWindowHours = 6 ;
9595 var adminActionsCount = await context . AdminActions
9696 . AsNoTracking ( )
9797 . CountAsync ( a =>
@@ -100,8 +100,8 @@ async Task<ApiResult<ServerOverviewDto>> IServerAnalyticsApi.GetOverview(Guid ga
100100 && context . RecentPlayers . Any ( rp =>
101101 rp . PlayerId == a . PlayerId
102102 && rp . GameServerId == gameServerId
103- && rp . Timestamp >= a . Created - correlationWindow
104- && rp . Timestamp <= a . Created + correlationWindow ) ,
103+ && rp . Timestamp >= a . Created . AddHours ( - correlationWindowHours )
104+ && rp . Timestamp <= a . Created . AddHours ( correlationWindowHours ) ) ,
105105 cancellationToken ) . ConfigureAwait ( false ) ;
106106
107107 var dto = new ServerOverviewDto
You can’t perform that action at this time.
0 commit comments