|
@@ -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{
|