fix: debug messages on webhook controller

pull/1/head
Nilo Roberto C Paim 2023-08-09 18:34:11 -03:00
parent 0b65309bbb
commit 956db4f782
5 changed files with 36 additions and 18 deletions

32
.env
View File

@ -2,14 +2,14 @@
API_SECRET=nyEX8BZ44KqTXeV2
# DB configuration DEVELOPMENT
API_PORT=8111
API_RELEASE="Desenvolvimento"
DB_HOST=177.153.50.98
DB_DRIVER=postgres
DB_USER=pcastdev
DB_PASSWORD=@407Smc837
DB_NAME=pcastdev
DB_PORT=5432
#API_PORT=8111
#API_RELEASE="Desenvolvimento"
#DB_HOST=177.153.50.98
#DB_DRIVER=postgres
#DB_USER=pcastdev
#DB_PASSWORD=@407Smc837
#DB_NAME=pcastdev
#DB_PORT=5432
# DB configuration HOMOLOGAÇÃO
#API_PORT=8111
@ -22,11 +22,11 @@ DB_PORT=5432
#DB_PORT=5432
# DB configuration PRODUÇÃO
#API_PORT=8112
#API_RELEASE=""
#DB_HOST=177.153.50.98
#DB_DRIVER=postgres
#DB_USER=pcast
#DB_PASSWORD=@407Smc837
#DB_NAME=pcast
#DB_PORT=5432
API_PORT=8112
API_RELEASE=""
DB_HOST=177.153.50.98
DB_DRIVER=postgres
DB_USER=pcast
DB_PASSWORD=@407Smc837
DB_NAME=pcast
DB_PORT=5432

BIN
api.exe~

Binary file not shown.

View File

@ -47,7 +47,7 @@ func OnUpdate(c *fiber.Ctx) error {
func OnSubStart(c *fiber.Ctx) error {
p := new(models.Update)
if err := c.BodyParser(p); err != nil {
log.Printf("Error Update: %s\n", err)
log.Printf("Error SubStart: %s\n", err)
return err
}
@ -64,6 +64,9 @@ func OnSubStart(c *fiber.Ctx) error {
}
func OnPubStart(c *fiber.Ctx) error {
// ================================================================
// Called when a publisher starts streaming - Start of Transmission
// ================================================================
p := new(models.Pub)
if err := c.BodyParser(p); err != nil {
return err
@ -73,6 +76,9 @@ func OnPubStart(c *fiber.Ctx) error {
}
func OnPubStop(c *fiber.Ctx) error {
// =============================================================
// Called when a publisher stops streaming - End of Transmission
// =============================================================
p := new(models.Pub)
if err := c.BodyParser(p); err != nil {
return err

View File

@ -1,6 +1,6 @@
package globals
var (
API_VERSION = "1.0.20"
API_VERSION = "1.0.21"
API_RELEASE = ""
)

12
infra/mqtt.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Mqtt Broker
After=multi-user.target
[Service]
WorkingDirectory=/root/mqtt/cmd
ExecStart=/root/mqtt/cmd/mqtt
Type=simple
[Install]
WantedBy=multi-user.target