chore(go): move stream keys to use generated type. For #3778

This commit is contained in:
Gabe Kangas
2025-01-18 16:38:59 -08:00
parent b3947ef7ea
commit e78d62ce63
8 changed files with 29 additions and 32 deletions

View File

@@ -4,7 +4,7 @@ import (
"strings"
"github.com/owncast/owncast/core/data"
"github.com/owncast/owncast/models"
"github.com/owncast/owncast/webserver/handlers/generated"
log "github.com/sirupsen/logrus"
)
@@ -63,8 +63,9 @@ func migrateToDatastoreValues2(datastore *data.Datastore, configRepository Confi
oldAdminPassword, _ := datastore.GetString("stream_key")
// Avoids double hashing the password
_ = datastore.SetString("admin_password_key", oldAdminPassword)
_ = configRepository.SetStreamKeys([]models.StreamKey{
{Key: oldAdminPassword, Comment: "Default stream key"},
comment := "Default stream key"
_ = configRepository.SetStreamKeys([]generated.StreamKey{
{Key: &oldAdminPassword, Comment: &comment},
})
}