It's state, not config.
This commit is contained in:
@@ -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 ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user