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

23 lines
636 B
Go
Raw Normal View History

2020-09-06 16:19:34 +08:00
package clusters
import (
2020-12-03 11:03:12 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
2020-10-25 21:27:28 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/clusterutils"
2020-09-06 16:19:34 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
"github.com/iwind/TeaGo"
)
func init() {
TeaGo.BeforeStart(func(server *TeaGo.Server) {
server.
2020-12-03 11:03:12 +08:00
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeNode)).
2020-10-25 21:27:28 +08:00
Helper(clusterutils.NewClustersHelper()).
2020-09-06 16:19:34 +08:00
Prefix("/clusters").
Get("", new(IndexAction)).
GetPost("/create", new(CreateAction)).
Post("/sync", new(SyncAction)).
Post("/checkChange", new(CheckChangeAction)).
2020-09-06 16:19:34 +08:00
EndAll()
})
}