Skip to content

Commit

Permalink
Fix auditing
Browse files Browse the repository at this point in the history
  • Loading branch information
robrotheram committed Jan 2, 2024
1 parent 74cfaea commit 2e9e491
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions pkg/controllers/auditing.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ func (a *Auditing) Send(event Event) {
return
}
log.WithFields(log.Fields{
"user": event.Action.User,
"action": event.Action.Type,
"channel": event.Action.Channel,
"user": event.Action.User,
"action": event.Action.Type,
}).Info(event.Message)
}
5 changes: 3 additions & 2 deletions pkg/controllers/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,9 @@ func (c *Controller) Notify(action ActionType, user string) {
c.notifications.events <- Event{
ID: state.ID,
Action: Action{
Type: action,
User: user,
Type: action,
User: user,
Channel: state.ID,
},
State: state,
}
Expand Down
5 changes: 3 additions & 2 deletions pkg/controllers/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package controllers
type ActionType string

type Action struct {
Type ActionType `json:"type"`
User string `json:"user"`
Type ActionType `json:"type"`
User string `json:"user"`
Channel string `json:"channel"`
}

var (
Expand Down

0 comments on commit 2e9e491

Please sign in to comment.