Changed module name to github Path, and minor changes
This commit is contained in:
@@ -19,14 +19,14 @@ func NewSetting(name string, defaultValue string) Setting {
|
||||
}
|
||||
|
||||
func initSettings(settings *DbTable[string, Setting]) {
|
||||
addSettingIfNotExists(NewSetting("theme", "white"), settings)
|
||||
addSettingIfNotExists(NewSetting("order", "title"), settings)
|
||||
addSettingIfNotExists("theme", "white", settings)
|
||||
addSettingIfNotExists("order", "title", settings)
|
||||
}
|
||||
|
||||
func addSettingIfNotExists(setting Setting, settings *DbTable[string, Setting]) {
|
||||
_, exists := settings.Get(setting.Name)
|
||||
func addSettingIfNotExists(name string, value string, settings *DbTable[string, Setting]) {
|
||||
_, exists := settings.Get(name)
|
||||
if !exists {
|
||||
settings.Set(setting.Name, setting)
|
||||
settings.Set(name, NewSetting(name, value))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user