41 lines
1.2 KiB
Go
41 lines
1.2 KiB
Go
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
|
|
|
package antiddos
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeUser/internal/web/actions/default/anti-ddos/instances"
|
|
"github.com/TeaOSLab/EdgeUser/internal/web/actions/default/anti-ddos/packages"
|
|
"github.com/TeaOSLab/EdgeUser/internal/web/helpers"
|
|
"github.com/iwind/TeaGo"
|
|
)
|
|
|
|
func init() {
|
|
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
|
server.
|
|
Helper(helpers.NewUserMustAuth("")).
|
|
Data("teaMenu", "anti-ddos").
|
|
Prefix("/anti-ddos").
|
|
Get("", new(IndexAction)).
|
|
|
|
// 实例
|
|
Prefix("/anti-ddos/instances").
|
|
Data("teaSubMenu", "instance").
|
|
Get("", new(instances.IndexAction)).
|
|
Post("/delete", new(instances.DeleteAction)).
|
|
GetPost("/updateObjectsPopup", new(instances.UpdateObjectsPopupAction)).
|
|
Post("/userServers", new(instances.UserServersAction)).
|
|
GetPost("/renew", new(instances.RenewAction)).
|
|
GetPost("/renewConfirm", new(instances.RenewConfirmAction)).
|
|
|
|
// 产品
|
|
Prefix("/anti-ddos/packages").
|
|
Data("teaSubMenu", "package").
|
|
Get("", new(packages.IndexAction)).
|
|
Post("/price", new(packages.PriceAction)).
|
|
GetPost("/confirm", new(packages.ConfirmAction)).
|
|
|
|
//
|
|
EndAll()
|
|
})
|
|
}
|