implemented on_rtmp_connect

main
nilo 2024-11-06 19:51:05 -03:00
parent 28058c9432
commit 2a0dc7b114
2 changed files with 6 additions and 0 deletions

View File

@ -28,6 +28,11 @@ func ServerStart(c *fiber.Ctx) error {
return c.SendString("Server started: " + string(c.Body()))
}
func OnRtmpConnect(c *fiber.Ctx) error {
utils.PrettyPrintJson(c.Body())
return c.SendString("On_Rtmp_Connect: " + string(c.Body()))
}
func OnUpdate(c *fiber.Ctx) error {
p := new(models.Update)
if err := c.BodyParser(p); err != nil {

View File

@ -24,6 +24,7 @@ func Setup(app *fiber.App) {
// Webhooks
app.Post("/on_server_start", controllers.ServerStart)
app.Post("/on_rtmp_connect", controllers.OnRtmpConnect)
app.Post("/on_update", controllers.OnUpdate)
app.Post("/on_pub_start", controllers.OnPubStart)
app.Post("/on_pub_stop", controllers.OnPubStop)