Skip to content

Commit

Permalink
fix: audit-logs: cast correctly the metadata map (#258)
Browse files Browse the repository at this point in the history
Signed-off-by: Romain Beuque <[email protected]>
  • Loading branch information
rbeuque74 committed Apr 12, 2021
1 parent 62e0a7d commit 4c14c06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ func addMetadata(c *gin.Context, metadataKey, name string, value interface{}) {
c.Set(metadataKey, m)
}

func GetActionMetadata(c *gin.Context) map[string]string {
func GetActionMetadata(c *gin.Context) map[string]interface{} {
return getMetadata(c, ActionMetadataKey)
}

func getMetadata(c *gin.Context, metadataKey string) map[string]string {
func getMetadata(c *gin.Context, metadataKey string) map[string]interface{} {
i, _ := c.Get(metadataKey)
m, ok := i.(map[string]string)
m, ok := i.(map[string]interface{})
if !ok {
return nil
}
Expand Down

0 comments on commit 4c14c06

Please sign in to comment.