Skip to content

Commit

Permalink
fix: added custom marshaler for subscribe over HTTP
Browse files Browse the repository at this point in the history
  • Loading branch information
mattayres committed Sep 7, 2022
1 parent ebd7d73 commit b52fdb3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions api/server/v1/marshaler.go
Expand Up @@ -643,6 +643,15 @@ func (x *PublishRequest) UnmarshalJSON(data []byte) error {
return nil
}

func (x *SubscribeResponse) MarshalJSON() ([]byte, error) {
resp := struct {
Message json.RawMessage `json:"message"`
}{
Message: x.Message,
}
return json.Marshal(resp)
}

// Proper marshal timestamp in metadata
type dmlResponse struct {
Metadata Metadata `json:"metadata,omitempty"`
Expand Down

0 comments on commit b52fdb3

Please sign in to comment.