33 lines
788 B
Go
33 lines
788 B
Go
//go:build plus
|
|
|
|
package userscripts
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/user-scripts/script"
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
|
"github.com/iwind/TeaGo"
|
|
)
|
|
|
|
func init() {
|
|
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
|
server.
|
|
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeServer)).
|
|
Data("teaMenu", "servers").
|
|
Data("teaSubMenu", "userScript").
|
|
|
|
// index
|
|
Prefix("/servers/user-scripts").
|
|
Get("", new(IndexAction)).
|
|
|
|
// script
|
|
Prefix("/servers/user-scripts/script").
|
|
Get("", new(script.IndexAction)).
|
|
Post("/pass", new(script.PassAction)).
|
|
GetPost("/rejectPopup", new(script.RejectPopupAction)).
|
|
|
|
//
|
|
EndAll()
|
|
})
|
|
}
|