mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
feat: config history
This commit is contained in:
parent
771859d3b8
commit
57b8dfd2f9
15 changed files with 823 additions and 75 deletions
|
@ -47,6 +47,12 @@ func EditConfig(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
err = config.CheckAndCreateHistory(absPath, content)
|
||||
if err != nil {
|
||||
cosy.ErrHandler(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
if content != "" && content != string(origContent) {
|
||||
err = os.WriteFile(absPath, []byte(content), 0644)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue