feat: add audit exporting and filtering (#1314)

This commit is contained in:
Colin Adler
2022-05-09 17:05:01 -05:00
committed by GitHub
parent ac27f645eb
commit 20caee1502
15 changed files with 448 additions and 14 deletions

View File

@ -1644,11 +1644,16 @@ func (q *fakeQuerier) GetAuditLogsBefore(_ context.Context, arg database.GetAudi
logs := make([]database.AuditLog, 0)
start := database.AuditLog{}
for _, alog := range q.auditLogs {
if alog.ID == arg.ID {
start = alog
break
if arg.ID != uuid.Nil {
for _, alog := range q.auditLogs {
if alog.ID == arg.ID {
start = alog
break
}
}
} else {
start.ID = uuid.New()
start.Time = arg.StartTime
}
if start.ID == uuid.Nil {