Skip to content

Commit

Permalink
fix: version bug
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Oct 12, 2024
1 parent 1785b8e commit 787bb80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/service/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (s *InfoService) SystemInfo(w http.ResponseWriter, r *http.Request) {
Success(w, chix.M{
"os_name": monitorInfo.Host.Platform + " " + monitorInfo.Host.PlatformVersion,
"uptime": fmt.Sprintf("%.2f", float64(monitorInfo.Host.Uptime)/86400),
"panel_version": app.Conf.MustString("app.version"),
"panel_version": app.Version,
})
}

Expand Down Expand Up @@ -207,7 +207,7 @@ func (s *InfoService) InstalledDbAndPhp(w http.ResponseWriter, r *http.Request)
}

func (s *InfoService) CheckUpdate(w http.ResponseWriter, r *http.Request) {
current := app.Conf.MustString("app.version")
current := app.Version
latest, err := s.api.LatestVersion()
if err != nil {
Error(w, http.StatusInternalServerError, "获取最新版本失败")
Expand Down Expand Up @@ -237,7 +237,7 @@ func (s *InfoService) CheckUpdate(w http.ResponseWriter, r *http.Request) {
}

func (s *InfoService) UpdateInfo(w http.ResponseWriter, r *http.Request) {
current := app.Conf.MustString("app.version")
current := app.Version
latest, err := s.api.LatestVersion()
if err != nil {
Error(w, http.StatusInternalServerError, "获取最新版本失败")
Expand Down

0 comments on commit 787bb80

Please sign in to comment.