Add omitempty in event struct

This commit is contained in:
George Suntres
2026-04-23 14:33:30 -04:00
parent f0c0c55e89
commit d673df0ca1

View File

@@ -12,11 +12,11 @@ const (
type AuditResult struct { type AuditResult struct {
Op Op `bson:"op" json:"op"` Op Op `bson:"op" json:"op"`
Entity string `bson:"entity" json:"entity"` Entity string `bson:"entity,omitempty" json:"entity,omitempty"`
Data any `bson:"data" json:"data"` Data any `bson:"data,omitempty" json:"data,omitempty",`
Before any `bson:"before" json:"before"` Before any `bson:"before,omitempty" json:"before,omitempty"`
After any `bson:"after" json:"after"` After any `bson:"after,omitempty" json:"after,omitempty"`
Context any `bson:"context" json:"context"` Context any `bson:"context,omitempty" json:"context,omitempty"`
} }
type OnAudit func(audit *AuditResult) error type OnAudit func(audit *AuditResult) error