Skip to content

Commit

Permalink
fix: panel version
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Oct 12, 2024
1 parent 3fae54b commit b9d5aa5
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ app:
key: a-long-string-with-32-characters
locale: zh_CN
timezone: Asia/Shanghai
version: 2.3.0
root: /www
http:
debug: false
Expand Down
2 changes: 1 addition & 1 deletion internal/bootstrap/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func initConf() {

func initGlobal() {
app.Root = app.Conf.MustString("app.root")
app.Version = app.Conf.MustString("app.version")
app.Version = "2.3.0"
app.Locale = app.Conf.MustString("app.locale")

// 初始化时区
Expand Down
2 changes: 1 addition & 1 deletion internal/service/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ func (s *CliService) Init(ctx context.Context, cmd *cli.Command) error {
return fmt.Errorf("已经初始化过了")
}

settings := []biz.Setting{{Key: biz.SettingKeyName, Value: "耗子面板"}, {Key: biz.SettingKeyMonitor, Value: "1"}, {Key: biz.SettingKeyMonitorDays, Value: "30"}, {Key: biz.SettingKeyBackupPath, Value: filepath.Join(app.Root, "backup")}, {Key: biz.SettingKeyWebsitePath, Value: filepath.Join(app.Root, "wwwroot")}, {Key: biz.SettingKeyVersion, Value: app.Conf.String("app.version")}}
settings := []biz.Setting{{Key: biz.SettingKeyName, Value: "耗子面板"}, {Key: biz.SettingKeyMonitor, Value: "1"}, {Key: biz.SettingKeyMonitorDays, Value: "30"}, {Key: biz.SettingKeyBackupPath, Value: filepath.Join(app.Root, "backup")}, {Key: biz.SettingKeyWebsitePath, Value: filepath.Join(app.Root, "wwwroot")}, {Key: biz.SettingKeyVersion, Value: app.Version}}
if err := app.Orm.Create(&settings).Error; err != nil {
return fmt.Errorf("初始化失败:%v", err)
}
Expand Down
1 change: 0 additions & 1 deletion pkg/types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ type PanelAppConfig struct {
Key string `yaml:"key"`
Locale string `yaml:"locale"`
Timezone string `yaml:"timezone"`
Version string `yaml:"version"`
Root string `yaml:"root"`
}

Expand Down

0 comments on commit b9d5aa5

Please sign in to comment.