From 6df045e13c795aa3cbbc2105c33217f89641e4ca Mon Sep 17 00:00:00 2001 From: Nilo Roberto C Paim Date: Fri, 5 Dec 2025 23:59:57 -0300 Subject: [PATCH] bugfix on transmissions table --- models/models.go | 2 +- services/channelservices.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/models.go b/models/models.go index 69c1cce..28042f1 100644 --- a/models/models.go +++ b/models/models.go @@ -227,7 +227,7 @@ func (Canal) TableName() string { // CurrentTransmission represents the transmissions table in the database type CurrentTransmission struct { ID uint `gorm:"primaryKey;column:id;autoIncrement"` - Canal string `gorm:"column:canal;type:text;not null"` + Canal uint `gorm:"column:canal;type:text;not null"` Inicio time.Time `gorm:"column:inicio;type:timestamp;not null"` Duracao int `gorm:"column:duracao;not null"` Assistentes int `gorm:"column:assistentes;not null"` diff --git a/services/channelservices.go b/services/channelservices.go index dbb8631..797e623 100644 --- a/services/channelservices.go +++ b/services/channelservices.go @@ -38,7 +38,7 @@ func VerifyTransmissionAuthorization(channelname, sessionid, transmissionkey, pl log.Printf("Error finding channel '%s': %v\n", channelname, result.Error) } - currentTransmission.Canal = channel.Nome + currentTransmission.Canal = channel.ID currentTransmission.SessionID = sessionid currentTransmission.Chave = transmissionkey currentTransmission.LimiteDiario = channel.LimiteDiario