实现迁移辅助功能(系统设置 -- 高级设置 -- 迁移)

This commit is contained in:
GoEdgeLab
2021-11-20 18:58:58 +08:00
parent abda31c89a
commit 615e47e9d0
14 changed files with 971 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
package transfer
import (
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/settings/settingutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
"github.com/iwind/TeaGo"
)
func init() {
TeaGo.BeforeStart(func(server *TeaGo.Server) {
server.
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeSetting)).
Helper(settingutils.NewAdvancedHelper("transfer")).
Prefix("/settings/transfer").
Get("", new(IndexAction)).
Post("/validateAPI", new(ValidateAPIAction)).
Post("/updateHosts", new(UpdateHostsAction)).
Post("/upgradeNodes", new(UpgradeNodesAction)).
Post("/statNodes", new(StatNodesAction)).
EndAll()
})
}