diff --git a/services/channelservices.go b/services/channelservices.go index 0bfcf0c..bd2fab7 100644 --- a/services/channelservices.go +++ b/services/channelservices.go @@ -8,7 +8,7 @@ import ( func GetChannelByName(channelname string) models.Channel { var channel models.Channel - globals.DB.Debug().Where("name = ?", channelname).Find(&channel) + globals.DB.Debug().Where("name = ?", channelname).First(&channel) return channel } diff --git a/services/transmlogservices.go b/services/transmlogservices.go index ba43b98..e3d3b29 100644 --- a/services/transmlogservices.go +++ b/services/transmlogservices.go @@ -14,7 +14,7 @@ func AddTransmissionlog(channelname, message string) { tlog.Message = message tlog.Datetime = time.Now() - result := globals.DB.Debug().Create(&tlog) + result := globals.DB.Create(&tlog) if result.Error != nil { log.Printf("%v\n", result.Error)