mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: add auditing to user routes (#3961)
This commit is contained in:
@ -22,3 +22,18 @@ func (nop) Export(context.Context, database.AuditLog) error {
|
||||
}
|
||||
|
||||
func (nop) diff(any, any) Map { return Map{} }
|
||||
|
||||
func NewMock() *MockAuditor {
|
||||
return &MockAuditor{}
|
||||
}
|
||||
|
||||
type MockAuditor struct {
|
||||
AuditLogs []database.AuditLog
|
||||
}
|
||||
|
||||
func (a *MockAuditor) Export(_ context.Context, alog database.AuditLog) error {
|
||||
a.AuditLogs = append(a.AuditLogs, alog)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (*MockAuditor) diff(any, any) Map { return Map{} }
|
||||
|
Reference in New Issue
Block a user