mirror of
https://github.com/foomo/sesamy-go.git
synced 2025-10-16 12:35:43 +00:00
fix: nil pointer access
This commit is contained in:
parent
e5f48dcad8
commit
d88146a2e9
@ -104,7 +104,7 @@ func (s *Subscriber) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
if payload.EventName.String() == "" {
|
if payload.EventName == nil || payload.EventName.String() == "" {
|
||||||
http.Error(w, "missing event name", http.StatusBadRequest)
|
http.Error(w, "missing event name", http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user