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

22 lines
532 B
Go
Raw Normal View History

2020-10-20 20:18:12 +08:00
package messages
import (
2020-12-03 11:03:12 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
2020-10-20 20:18:12 +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.AdminModuleCodeCommon)).
2020-10-20 20:18:12 +08:00
Helper(new(Helper)).
Prefix("/messages").
GetPost("", new(IndexAction)).
Post("/badge", new(BadgeAction)).
Post("/readAll", new(ReadAllAction)).
Post("/readPage", new(ReadPageAction)).
EndAll()
})
}