Skip to content

Commit

Permalink
Update sftp event metadata (#59)
Browse files Browse the repository at this point in the history
* update sftp metadata

* overwrite metadata

* fix assignment
  • Loading branch information
Boy132 authored Jan 14, 2025
1 parent ad292b6 commit 249846b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sftp/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func (eh *eventHandler) Log(e models.Event, fa FileAction) error {
"files": []string{fa.Entity},
}
if fa.Target != "" {
metadata["files"] = []map[string]string{
{"from": fa.Entity, "to": fa.Target},
metadata = map[string]interface{}{
"from": fa.Entity,
"to": fa.Target,
}
}

Expand Down

0 comments on commit 249846b

Please sign in to comment.