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

19 lines
483 B
Go
Raw Normal View History

2020-07-22 22:19:39 +08:00
package dashboard
import (
2020-12-03 11:03:12 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
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.Prefix("/dashboard").
2021-01-21 18:55:53 +08:00
Data("teaMenu", "dashboard").
2020-12-03 11:03:12 +08:00
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeCommon)).
2020-07-22 22:19:39 +08:00
GetPost("", new(IndexAction)).
Post("/restartLocalAPINode", new(RestartLocalAPINodeAction)).
2020-07-22 22:19:39 +08:00
EndAll()
})
}