enhance: update gonginx and cosy to latest version

This commit is contained in:
0xJacky 2024-01-14 10:53:27 +08:00
parent af9395ad69
commit 85da74b3f0
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
39 changed files with 799 additions and 662 deletions

View file

@ -136,7 +136,6 @@ func GetDomain(c *gin.Context) {
return
}
c.Set("maybe_error", "nginx_config_syntax_error")
nginxConfig, err := nginx.ParseNgxConfig(path)
if err != nil {
@ -144,8 +143,6 @@ func GetDomain(c *gin.Context) {
return
}
c.Set("maybe_error", "")
certInfoMap := make(map[int]*cert.Info)
for serverIdx, server := range nginxConfig.Servers {
@ -166,8 +163,6 @@ func GetDomain(c *gin.Context) {
}
}
c.Set("maybe_error", "nginx_config_syntax_error")
c.JSON(http.StatusOK, Site{
ModifiedAt: file.ModTime(),
Advanced: site.Advanced,
@ -259,7 +254,6 @@ func SaveDomain(c *gin.Context) {
if nginx.GetLogLevel(output) > nginx.Warn {
c.JSON(http.StatusInternalServerError, gin.H{
"message": output,
"error": "nginx_config_syntax_error",
})
return
}