fix(coderd/database): aggregate user engagement statistics by interval (#16150)

This PR addresses the TODO comment here:

https://github.com/coder/coder/pull/16134/files#diff-1844f895bb005f036da11d800fe2a76b54bfddd481c5d8cb15f210c64679caa5R47

The backend now backfills entries for dates with no status changes.
This commit is contained in:
Sas Swart
2025-01-16 17:34:53 +02:00
committed by GitHub
parent 296dbf0918
commit 50bf5ca8fe
6 changed files with 141 additions and 141 deletions

View File

@ -1712,6 +1712,7 @@ func (s *MethodTestSuite) TestUser() {
check.Args(database.GetUserStatusCountsParams{
StartTime: time.Now().Add(-time.Hour * 24 * 30),
EndTime: time.Now(),
Interval: int32((time.Hour * 24).Seconds()),
}).Asserts(rbac.ResourceUser, policy.ActionRead)
}))
}