Skip to content

Commit

Permalink
Fix time vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Font committed Jul 26, 2024
1 parent afae162 commit a1a4ed8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (s *GitLabLogStreamer) preloadDBRecentData() error {
// and insert them into s.latestAuditLogEvents

auditEvents := []*AuditEvent{}
err := s.db.Where("created_at > ?", time.Now().AddDate(0, 0, -PreloadEventsPeriodDays)).Find(&auditEvents).Error
err := s.db.Where("time > ?", time.Now().AddDate(0, 0, -PreloadEventsPeriodDays)).Find(&auditEvents).Error
if err != nil {
return err
}
Expand All @@ -102,7 +102,7 @@ func (s *GitLabLogStreamer) preloadDBRecentData() error {
// load the auth log events from the last preloadEventsPeriodDays from s.db
// and insert them into s.latestAuthEvents
authEvent := []*AuthEvent{}
err = s.db.Where("created_at > ?", time.Now().AddDate(0, 0, -PreloadEventsPeriodDays)).Find(&authEvent).Error
err = s.db.Where("time > ?", time.Now().AddDate(0, 0, -PreloadEventsPeriodDays)).Find(&authEvent).Error
if err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion types_audit_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ type AuditEvent struct {
AuthorName string `json:"author_name"`
EntityID int64 `json:"entity_id"`
EntityType AuthorClass `json:"entity_type"`
CreatedAt time.Time `json:"created_at"`
IPAddress string `json:"ip_address"`
With *With `json:"with,omitempty"`
TargetID *int64 `json:"target_id"`
Expand Down

0 comments on commit a1a4ed8

Please sign in to comment.