fix: default updater owner & repo to ongtrieuhau/web-giao-ban

This commit is contained in:
ongtrieuhau
2026-10-26 00:16:27 -07:00
parent 228d4d14df
commit f5f118c5b0
5 changed files with 21 additions and 11 deletions
+10 -2
View File
@@ -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
}