diff --git a/nginx-ui-frontend/version.json b/nginx-ui-frontend/version.json index 081d9bc2..09ae2bb4 100644 --- a/nginx-ui-frontend/version.json +++ b/nginx-ui-frontend/version.json @@ -1 +1 @@ -{"version":"0.1.0","build_id":21} \ No newline at end of file +{"version":"0.1.0","build_id":22} \ No newline at end of file diff --git a/server/api/domain.go b/server/api/domain.go index bae41f12..59e10015 100644 --- a/server/api/domain.go +++ b/server/api/domain.go @@ -97,15 +97,15 @@ func EditDomain(c *gin.Context) { err = c.BindJSON(&request) path := filepath.Join(tool.GetNginxConfPath("sites-available"), name) - /*if _, err = os.Stat(path); err == nil { + if _, err = os.Stat(path); err == nil { origContent, err = ioutil.ReadFile(path) if err != nil { ErrorHandler(c, err) return } - }*/ + } - if request["content"] != "" /*&& request["content"] != string(origContent)*/ { + if request["content"] != "" && request["content"] != string(origContent) { // model.CreateBackup(path) err := ioutil.WriteFile(path, []byte(request["content"].(string)), 0644) if err != nil {