diff --git a/controllers/webhookController.go b/controllers/webhookController.go index 220129c..5b74463 100644 --- a/controllers/webhookController.go +++ b/controllers/webhookController.go @@ -103,8 +103,10 @@ func OnPubStart(c *fiber.Ctx) error { // ================================================================ p := new(models.Pub) if err := c.BodyParser(p); err != nil { + log.Printf("Error PubStart: %s\n", err) return err } + log.Printf("Start channel %s, urlParam %s, SessionId %s\n", p.Channel, p.UrlParam, p.SessionId) KickSession(p.Channel, p.SessionId) diff --git a/models/webhooks.go b/models/webhooks.go index 3f57b0a..b4c28c1 100644 --- a/models/webhooks.go +++ b/models/webhooks.go @@ -22,8 +22,8 @@ type Pub struct { UrlParam string `json:"url_param"` HasInSession bool `json:"has_in_session"` HasOutSession bool `json:"has_out_session"` - ReadBytesSum bool `json:"read_bytes_sum"` - WroteBytesSum bool `json:"wrote_bytes_sum"` + ReadBytesSum int `json:"read_bytes_sum"` + WroteBytesSum int `json:"wrote_bytes_sum"` } type Update struct {