API + Data changes to support split up of stream keys and admin passwords

This commit is contained in:
Gabe Kangas
2022-11-22 22:08:25 -08:00
parent 1645451faa
commit c9e3ccad45
11 changed files with 116 additions and 37 deletions

View File

@@ -42,7 +42,7 @@ func main() {
// Create the data directory if needed
if !utils.DoesFileExists("data") {
if err := os.Mkdir("./data", 0700); err != nil {
if err := os.Mkdir("./data", 0o700); err != nil {
log.Fatalln("Cannot create data directory", err)
}
}
@@ -54,7 +54,7 @@ func main() {
log.Fatalln("Unable to remove temp dir!")
}
}
if err := os.Mkdir(config.TempDir, 0700); err != nil {
if err := os.Mkdir(config.TempDir, 0o700); err != nil {
log.Fatalln("Unable to create temp dir!", err)
}
@@ -102,7 +102,7 @@ func main() {
func handleCommandLineFlags() {
if *newStreamKey != "" {
if err := data.SetStreamKey(*newStreamKey); err != nil {
if err := data.SetAdminPassword(*newStreamKey); err != nil {
log.Errorln("Error setting your stream key.", err)
log.Exit(1)
} else {