mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 18:35:51 +02:00
refactor: refresh 25.04
This commit is contained in:
parent
818bf9bcf6
commit
b63dbe1e50
98 changed files with 5283 additions and 4817 deletions
|
@ -2,6 +2,11 @@ package stream
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"runtime"
|
||||
"sync"
|
||||
|
||||
"github.com/0xJacky/Nginx-UI/internal/helper"
|
||||
"github.com/0xJacky/Nginx-UI/internal/nginx"
|
||||
"github.com/0xJacky/Nginx-UI/internal/notification"
|
||||
|
@ -9,10 +14,6 @@ import (
|
|||
"github.com/go-resty/resty/v2"
|
||||
"github.com/uozi-tech/cosy"
|
||||
"github.com/uozi-tech/cosy/logger"
|
||||
"net/http"
|
||||
"os"
|
||||
"runtime"
|
||||
"sync"
|
||||
)
|
||||
|
||||
func Rename(oldName string, newName string) (err error) {
|
||||
|
@ -59,6 +60,17 @@ func Rename(oldName string, newName string) (err error) {
|
|||
return cosy.WrapErrorWithParams(ErrNginxReloadFailed, output)
|
||||
}
|
||||
|
||||
// update ChatGPT history
|
||||
g := query.ChatGPTLog
|
||||
_, _ = g.Where(g.Name.Eq(oldName)).Update(g.Name, newName)
|
||||
|
||||
// update config history
|
||||
b := query.ConfigBackup
|
||||
_, _ = b.Where(b.FilePath.Eq(oldPath)).Updates(map[string]interface{}{
|
||||
"filepath": newPath,
|
||||
"name": newName,
|
||||
})
|
||||
|
||||
go syncRename(oldName, newName)
|
||||
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue