- payload := o.Payload
- if payload == nil {
- // return empty array
- payload = models.SubscriptionResult{}
- }
-
- if err := producer.Produce(rw, payload); err != nil {
- panic(err) // let the recovery middleware deal with this
+ if o.Payload != nil {
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }