mirror of
https://github.com/coder/coder.git
synced 2026-10-28 02:42:54 +08:00
chore: populate connectionlog count using a separate query (#18629)
This is the third PR for moving connection events out of the audit log. This PR populates `count` on `ConnectionLogResponse` using a separate query, to preemptively mitigate the issue described in #17689. It's structurally identical to a portion of https://github.com/coder/coder/pull/18600, but for the connection log instead of the audit log. Future PRs: - Implement a table in the Web UI for viewing connection logs. - Write a query to delete old events from the audit log, call it from dbpurge. - Write documentation for the endpoint / feature
This commit is contained in:
@@ -318,7 +318,7 @@ func hasEmptyResponse(values []reflect.Value) bool {
|
||||
}
|
||||
}
|
||||
|
||||
// Special case for int64, as it's the return type for count query.
|
||||
// Special case for int64, as it's the return type for count queries.
|
||||
if r.Kind() == reflect.Int64 {
|
||||
if r.Int() == 0 {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user