mirror of
https://github.com/usememos/memos.git
synced 2025-03-18 03:30:07 +01:00
chore: update public default value to false
This commit is contained in:
parent
22ec0cf2e3
commit
553e8d09dd
@ -110,7 +110,7 @@ func init() {
|
||||
rootCmd.PersistentFlags().StringVarP(&data, "data", "d", "", "data directory")
|
||||
rootCmd.PersistentFlags().StringVarP(&driver, "driver", "", "", "database driver")
|
||||
rootCmd.PersistentFlags().StringVarP(&dsn, "dsn", "", "", "database source name(aka. DSN)")
|
||||
rootCmd.PersistentFlags().BoolVarP(&public, "public", "", true, "")
|
||||
rootCmd.PersistentFlags().BoolVarP(&public, "public", "", false, "")
|
||||
|
||||
err := viper.BindPFlag("mode", rootCmd.PersistentFlags().Lookup("mode"))
|
||||
if err != nil {
|
||||
@ -145,7 +145,7 @@ func init() {
|
||||
viper.SetDefault("driver", "sqlite")
|
||||
viper.SetDefault("addr", "")
|
||||
viper.SetDefault("port", 8081)
|
||||
viper.SetDefault("public", true)
|
||||
viper.SetDefault("public", false)
|
||||
viper.SetEnvPrefix("memos")
|
||||
}
|
||||
|
||||
@ -166,9 +166,10 @@ dsn: %s
|
||||
addr: %s
|
||||
port: %d
|
||||
mode: %s
|
||||
public: %t
|
||||
driver: %s
|
||||
---
|
||||
`, instanceProfile.Version, instanceProfile.Data, instanceProfile.DSN, instanceProfile.Addr, instanceProfile.Port, instanceProfile.Mode, instanceProfile.Driver)
|
||||
`, instanceProfile.Version, instanceProfile.Data, instanceProfile.DSN, instanceProfile.Addr, instanceProfile.Port, instanceProfile.Mode, instanceProfile.Public, instanceProfile.Driver)
|
||||
}
|
||||
|
||||
func printGreetings() {
|
||||
|
@ -23,6 +23,9 @@ func (s *APIV1Service) GetWorkspaceProfile(ctx context.Context, _ *v1pb.GetWorks
|
||||
}
|
||||
if owner != nil {
|
||||
workspaceProfile.Owner = owner.Name
|
||||
} else {
|
||||
// If owner is not found, set public to true.
|
||||
workspaceProfile.Public = true
|
||||
}
|
||||
return workspaceProfile, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user