fix: default updater owner & repo to ongtrieuhau/web-giao-ban
This commit is contained in:
+10
-2
@@ -149,8 +149,8 @@ func DefaultConfig() *AppConfig {
|
||||
Updater: UpdaterConfig{
|
||||
Enabled: true,
|
||||
GiteaURL: "https://i.dh-his.com",
|
||||
Owner: "hdhiswork",
|
||||
Repo: "DUAN",
|
||||
Owner: "ongtrieuhau",
|
||||
Repo: "web-giao-ban",
|
||||
Token: "",
|
||||
CurrentVersion: "v1.0.0",
|
||||
},
|
||||
@@ -208,6 +208,14 @@ func LoadConfig(path string) (*AppConfig, error) {
|
||||
cfg.DecryptedDBPassword = decDB
|
||||
cfg.DecryptedUpdaterToken = decTok
|
||||
|
||||
// Auto-migrate legacy owner & repo
|
||||
if cfg.Updater.Owner == "" || cfg.Updater.Owner == "hdhiswork" {
|
||||
cfg.Updater.Owner = "ongtrieuhau"
|
||||
}
|
||||
if cfg.Updater.Repo == "" || cfg.Updater.Repo == "DUAN" {
|
||||
cfg.Updater.Repo = "web-giao-ban"
|
||||
}
|
||||
|
||||
currentConfig = cfg
|
||||
return cfg, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user