mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +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
|
||||
}
|
||||
|
||||
certModel, _ := model.FirstCert(name)
|
||||
|
||||
if site.Advanced {
|
||||
origContent, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
|
@ -122,6 +124,7 @@ func GetDomain(c *gin.Context) {
|
|||
"enabled": enabled,
|
||||
"name": name,
|
||||
"config": string(origContent),
|
||||
"auto_cert": certModel.AutoCert == model.AutoCertEnabled,
|
||||
"chatgpt_messages": chatgpt.Content,
|
||||
})
|
||||
return
|
||||
|
@ -161,8 +164,6 @@ func GetDomain(c *gin.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
certModel, _ := model.FirstCert(name)
|
||||
|
||||
c.Set("maybe_error", "nginx_config_syntax_error")
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue