2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 03:07:20 +08:00

fix: 写错了

This commit is contained in:
2026-01-24 18:56:36 +08:00
parent 9030a2e7e9
commit be7ebf963b

View File

@@ -205,7 +205,7 @@ func (s *App) SetPostgresPassword(w http.ResponseWriter, r *http.Request) {
}
oldPassword, _ := s.settingRepo.Get(biz.SettingKeyPostgresPassword)
postgres, err := db.NewPostgres("root", oldPassword, "127.0.0.1", 5432)
postgres, err := db.NewPostgres("postgres", oldPassword, "127.0.0.1", 5432)
if err != nil {
// 直接修改密码
if _, err = shell.Execf(`su - postgres -c "psql -c \"ALTER USER postgres WITH PASSWORD '%s';\""`, req.Password); err != nil {