Skip to content

Commit

Permalink
fix...
Browse files Browse the repository at this point in the history
  • Loading branch information
kataras committed Aug 17, 2023
1 parent 4c7a2c3 commit ac4bc3d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,9 @@ func notifyNative[T string | []byte](ctx context.Context, db *DB, channel string
func UnmarshalNotification[T any](n *Notification) (T, error) {
var payload T

b, err := stringToBytes(n.Payload)
if err != nil {
return payload, err
}
b := stringToBytes(n.Payload)

err = json.Unmarshal(b, &payload)
err := json.Unmarshal(b, &payload)
if err != nil {
return payload, err
}
Expand Down

0 comments on commit ac4bc3d

Please sign in to comment.