Files
EdgeAdmin/internal/web/actions/default/servers/init.go

42 lines
1.2 KiB
Go
Raw Normal View History

2020-07-22 22:19:39 +08:00
package servers
import (
2020-12-03 11:03:12 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/headers"
2021-11-09 15:36:18 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/users"
2020-07-22 22:19:39 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
"github.com/iwind/TeaGo"
)
func init() {
TeaGo.BeforeStart(func(server *TeaGo.Server) {
server.
2022-01-10 19:54:29 +08:00
Data("teaMenu", "servers").
2020-12-03 11:03:12 +08:00
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeServer)).
2020-07-22 22:19:39 +08:00
Helper(NewHelper()).
Prefix("/servers").
Get("", new(IndexAction)).
2020-07-29 19:34:54 +08:00
GetPost("/create", new(CreateAction)).
2020-08-21 12:32:16 +08:00
GetPost("/update", new(UpdateAction)).
Post("/nearby", new(NearbyAction)).
2024-01-11 18:40:29 +08:00
Post("/deleteServers", new(DeleteServersAction)).
2020-08-21 12:32:16 +08:00
//
2020-08-21 12:32:16 +08:00
GetPost("/addPortPopup", new(AddPortPopupAction)).
GetPost("/addServerNamePopup", new(AddServerNamePopupAction)).
GetPost("/addOriginPopup", new(AddOriginPopupAction)).
Get("/serverNamesPopup", new(ServerNamesPopupAction)).
Post("/status", new(StatusAction)).
2021-11-09 15:36:18 +08:00
// user
2021-11-09 15:36:18 +08:00
Post("/users/options", new(users.OptionsAction)).
Post("/users/plans", new(users.PlansAction)).
// header
Post("/headers/options", new(headers.OptionsAction)).
2021-11-09 15:36:18 +08:00
//
2020-07-22 22:19:39 +08:00
EndAll()
})
}