rename admin flag to password_admin
This commit is contained in:
parent
9c6fd9638e
commit
2bcd9e985b
2
server/.vscode/launch.json
vendored
2
server/.vscode/launch.json
vendored
@ -10,7 +10,7 @@
|
||||
"envFile": "${workspaceFolder}/.env.development",
|
||||
"output": "${workspaceFolder}/bin/debug/neko",
|
||||
"cwd": "${workspaceFolder}/",
|
||||
"args": ["serve", "-d", "--bind", ":3000", "--static", "../client/dist", "--password", "neko", "--admin", "admin"]
|
||||
"args": ["serve", "-d", "--bind", ":3000", "--static", "../client/dist", "--password", "neko", "--password_admin", "admin"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ func (WebSocket) Init(cmd *cobra.Command) error {
|
||||
return err
|
||||
}
|
||||
|
||||
cmd.PersistentFlags().String("admin", "admin", "admin password for connecting to stream")
|
||||
if err := viper.BindPFlag("admin", cmd.PersistentFlags().Lookup("admin")); err != nil {
|
||||
cmd.PersistentFlags().String("password_admin", "admin", "admin password for connecting to stream")
|
||||
if err := viper.BindPFlag("password_admin", cmd.PersistentFlags().Lookup("password_admin")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -26,5 +26,5 @@ func (WebSocket) Init(cmd *cobra.Command) error {
|
||||
|
||||
func (s *WebSocket) Set() {
|
||||
s.Password = viper.GetString("password")
|
||||
s.AdminPassword = viper.GetString("admin")
|
||||
s.AdminPassword = viper.GetString("password_admin")
|
||||
}
|
||||
|
Reference in New Issue
Block a user