mirror of
https://github.com/sot-tech/mochi.git
synced 2026-04-27 08:00:00 -07:00
http: stopped throwing error on invalid event
Event is an optional key, and if it's invalid or non-existent then it can just be assumed as 'none'
This commit is contained in:
@@ -24,7 +24,7 @@ func announceRequest(r *http.Request, cfg *httpConfig) (*chihaya.AnnounceRequest
|
||||
|
||||
eventStr, err := q.String("event")
|
||||
if err != nil {
|
||||
return nil, tracker.ClientError("failed to parse parameter: event")
|
||||
eventStr = "none"
|
||||
}
|
||||
request.Event, err = event.New(eventStr)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user