Initial commit (code only without large binaries)
This commit is contained in:
32
EdgeAdmin/internal/web/actions/default/ns/routes/init.go
Normal file
32
EdgeAdmin/internal/web/actions/default/ns/routes/init.go
Normal file
@@ -0,0 +1,32 @@
|
||||
//go:build plus
|
||||
|
||||
package routes
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/plus"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
||||
"github.com/iwind/TeaGo"
|
||||
)
|
||||
|
||||
func init() {
|
||||
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
||||
server.
|
||||
Helper(plus.NewHelper(plus.ComponentCodeNS)).
|
||||
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeNS)).
|
||||
Data("teaMenu", "ns").
|
||||
Data("teaSubMenu", "route").
|
||||
Prefix("/ns/routes").
|
||||
Get("", new(IndexAction)).
|
||||
Get("/route", new(RouteAction)).
|
||||
GetPost("/createPopup", new(CreatePopupAction)).
|
||||
GetPost("/updatePopup", new(UpdatePopupAction)).
|
||||
Post("/delete", new(DeleteAction)).
|
||||
Post("/sort", new(SortAction)).
|
||||
Post("/options", new(OptionsAction)).
|
||||
Get("/internal", new(InternalAction)).
|
||||
Get("/exportAgentIPs", new(ExportAgentIPsAction)).
|
||||
GetPost("/importAgentIPsPopup", new(ImportAgentIPsPopupAction)).
|
||||
EndAll()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user