It's state, not config.

This commit is contained in:
2026-07-10 05:21:03 +00:00
parent 4feaa63da0
commit 5c26c7530a
18 changed files with 184 additions and 216 deletions

View File

@@ -16,7 +16,7 @@ import (
func (api *API) CertStatus(w http.ResponseWriter, r *http.Request) {
centralDomain := api.getCentralDomain()
globalCfg, _ := config.LoadGlobalConfig(api.getGlobalConfigPath())
globalCfg, _ := config.LoadState(api.statePath())
email := ""
if globalCfg != nil {
email = globalCfg.Operator.Email
@@ -113,7 +113,7 @@ func (api *API) CertProvision(w http.ResponseWriter, r *http.Request) {
return
}
globalCfg, err := config.LoadGlobalConfig(api.getGlobalConfigPath())
globalCfg, err := config.LoadState(api.statePath())
if err != nil {
respondError(w, http.StatusInternalServerError, fmt.Sprintf("Failed to load config: %v", err))
return
@@ -179,7 +179,7 @@ func (api *API) CertRenew(w http.ResponseWriter, r *http.Request) {
// getCentralDomain returns the configured central domain or empty string.
func (api *API) getCentralDomain() string {
globalCfg, err := config.LoadGlobalConfig(api.getGlobalConfigPath())
globalCfg, err := config.LoadState(api.statePath())
if err != nil {
return ""
}