Skip to content

Commit

Permalink
code(pkg/notifier) - inform with json value
Browse files Browse the repository at this point in the history
  • Loading branch information
PxyUp committed Jan 25, 2024
1 parent ebafa37 commit 7950154
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pkg/notifier/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,8 @@ func buildBody(name string, result *parser.ParseResult, err error, logger logger
rr.Error = true
return rr
}
val := json.RawMessage{}
errUn := json.Unmarshal([]byte(result.ToJson()), &val)
if errUn != nil {
logger.Errorw("cant unmarshal result into json.RawMessage", "error", errUn.Error())
return rr
}
rr.Value = &val
msg := json.RawMessage(result.ToJson())
rr.Value = &msg

return rr
}
Expand Down

0 comments on commit 7950154

Please sign in to comment.