2020-09-06 16:19:34 +08:00
|
|
|
package node
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
|
|
|
|
"github.com/iwind/TeaGo"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
|
|
|
|
server.
|
|
|
|
|
Helper(helpers.NewUserMustAuth()).
|
|
|
|
|
Prefix("/api/node").
|
|
|
|
|
|
2020-10-04 14:27:05 +08:00
|
|
|
// 这里不受Helper的约束
|
|
|
|
|
GetPost("/createAddrPopup", new(CreateAddrPopupAction)).
|
|
|
|
|
GetPost("/updateAddrPopup", new(UpdateAddrPopupAction)).
|
|
|
|
|
|
2020-09-06 16:19:34 +08:00
|
|
|
// 节点相关
|
2020-10-04 14:27:05 +08:00
|
|
|
Helper(NewHelper()).
|
2020-09-06 16:19:34 +08:00
|
|
|
GetPost("/settings", new(SettingsAction)).
|
|
|
|
|
|
2020-10-04 14:27:05 +08:00
|
|
|
|
2020-09-06 16:19:34 +08:00
|
|
|
EndAll()
|
|
|
|
|
})
|
|
|
|
|
}
|