mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 02:45:49 +02:00
bug fix
This commit is contained in:
parent
00f0845f3f
commit
d5ae4abba5
3 changed files with 7 additions and 5 deletions
|
@ -34,7 +34,8 @@ export default {
|
||||||
* Keyboard shortcuts support, like <ctrl-v>
|
* Keyboard shortcuts support, like <ctrl-v>
|
||||||
*/
|
*/
|
||||||
change(event) {
|
change(event) {
|
||||||
this.$emit('input', event.target.value);
|
this.$emit('input', event.target.value)
|
||||||
|
this.$emit('changeValue', event.target.value);
|
||||||
},
|
},
|
||||||
updateValue(event) {
|
updateValue(event) {
|
||||||
let target = event.target;
|
let target = event.target;
|
||||||
|
|
|
@ -128,7 +128,8 @@ export default {
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
wsOnError() {
|
wsOnError() {
|
||||||
this.websocket = new WebSocket(this.getWebSocketRoot() + "/analytic")
|
this.websocket = new WebSocket(this.getWebSocketRoot() + "/analytic?token="
|
||||||
|
+ btoa(this.$store.state.user.token))
|
||||||
},
|
},
|
||||||
wsOnMessage(m) {
|
wsOnMessage(m) {
|
||||||
const r = JSON.parse(m.data)
|
const r = JSON.parse(m.data)
|
||||||
|
|
|
@ -97,15 +97,15 @@ func EditDomain(c *gin.Context) {
|
||||||
err = c.BindJSON(&request)
|
err = c.BindJSON(&request)
|
||||||
path := filepath.Join(tool.GetNginxConfPath("sites-available"), name)
|
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)
|
origContent, err = ioutil.ReadFile(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ErrorHandler(c, err)
|
ErrorHandler(c, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if request["content"] != "" && request["content"] != string(origContent) {
|
if request["content"] != "" /*&& request["content"] != string(origContent)*/ {
|
||||||
// model.CreateBackup(path)
|
// model.CreateBackup(path)
|
||||||
err := ioutil.WriteFile(path, []byte(request["content"].(string)), 0644)
|
err := ioutil.WriteFile(path, []byte(request["content"].(string)), 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue