mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
bug fix
This commit is contained in:
parent
d5ae4abba5
commit
83210f7c6c
2 changed files with 4 additions and 4 deletions
|
@ -1 +1 @@
|
|||
{"version":"0.1.0","build_id":21}
|
||||
{"version":"0.1.0","build_id":22}
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue