From dfa9f807c0fe221d25b489118cd112141900f339 Mon Sep 17 00:00:00 2001 From: nilo Date: Wed, 6 Nov 2024 21:09:38 -0300 Subject: [PATCH] bugfix on models --- controllers/webhookController.go | 2 ++ models/webhooks.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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 {