mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 10:55:51 +02:00
fix: auto cert state error on editor switch
This commit is contained in:
parent
ca3c9946ce
commit
4f5259cea6
1 changed files with 3 additions and 2 deletions
|
@ -110,6 +110,8 @@ func GetDomain(c *gin.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
certModel, _ := model.FirstCert(name)
|
||||||
|
|
||||||
if site.Advanced {
|
if site.Advanced {
|
||||||
origContent, err := os.ReadFile(path)
|
origContent, err := os.ReadFile(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -122,6 +124,7 @@ func GetDomain(c *gin.Context) {
|
||||||
"enabled": enabled,
|
"enabled": enabled,
|
||||||
"name": name,
|
"name": name,
|
||||||
"config": string(origContent),
|
"config": string(origContent),
|
||||||
|
"auto_cert": certModel.AutoCert == model.AutoCertEnabled,
|
||||||
"chatgpt_messages": chatgpt.Content,
|
"chatgpt_messages": chatgpt.Content,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
@ -161,8 +164,6 @@ func GetDomain(c *gin.Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
certModel, _ := model.FirstCert(name)
|
|
||||||
|
|
||||||
c.Set("maybe_error", "nginx_config_syntax_error")
|
c.Set("maybe_error", "nginx_config_syntax_error")
|
||||||
|
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue