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

27 lines
706 B
Go
Raw Normal View History

2020-07-22 22:19:39 +08:00
package nodes
import (
2020-07-29 19:34:54 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/nodes/grants"
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.
Helper(new(helpers.UserMustAuth)).
Helper(new(Helper)).
Prefix("/nodes").
Get("", new(IndexAction)).
GetPost("/create", new(CreateAction)).
2020-07-29 19:34:54 +08:00
// 授权管理
Get("/grants", new(grants.IndexAction)).
GetPost("/grants/create", new(grants.CreateAction)).
GetPost("/grants/update", new(grants.UpdateAction)).
Post("/grants/delete", new(grants.DeleteAction)).
Get("/grants/grant", new(grants.GrantAction)).
2020-07-22 22:19:39 +08:00
EndAll()
})
}