mirror of
https://github.com/datarhei/core.git
synced 2025-09-26 20:11:29 +08:00
Add config migration from version 1 to version 2
This commit is contained in:
@@ -154,6 +154,12 @@ func (a *api) Reload() error {
|
||||
}
|
||||
|
||||
cfg := store.Get()
|
||||
if err := cfg.Migrate(); err == nil {
|
||||
store.Set(cfg)
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
|
||||
cfg.Merge()
|
||||
|
||||
if len(cfg.Host.Name) == 0 && cfg.Host.Auto {
|
||||
|
Reference in New Issue
Block a user