mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
feat: enhance restore functionality with nginx restart and countdown dialog
This commit is contained in:
parent
4c2487580e
commit
0ca9d84d10
19 changed files with 768 additions and 641 deletions
|
@ -401,16 +401,6 @@ func cleanDirectoryPreservingStructure(dir string) error {
|
|||
|
||||
for _, entry := range entries {
|
||||
path := filepath.Join(dir, entry.Name())
|
||||
info, err := entry.Info()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Preserve symlinks - they will be handled separately during restore
|
||||
if info.Mode()&os.ModeSymlink != 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
err = os.RemoveAll(path)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -12,7 +12,6 @@ import (
|
|||
"github.com/0xJacky/Nginx-UI/internal/crypto"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/uozi-tech/cosy"
|
||||
"github.com/uozi-tech/cosy/logger"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -105,9 +104,6 @@ func EncryptedForm() gin.HandlerFunc {
|
|||
}
|
||||
}
|
||||
|
||||
logger.Debug("newForm values", newForm.Value)
|
||||
logger.Debug("newForm files", newForm.File)
|
||||
|
||||
// Replace the original form with our modified one
|
||||
c.Request.MultipartForm = newForm
|
||||
|
||||
|
@ -127,8 +123,6 @@ func EncryptedForm() gin.HandlerFunc {
|
|||
c.Request.PostForm[k] = v
|
||||
}
|
||||
|
||||
logger.Debug("PostForm after sync", c.Request.PostForm)
|
||||
|
||||
c.Next()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue