1.4.5.2
This commit is contained in:
30
EdgeUser/internal/web/actions/default/api/init.go
Normal file
30
EdgeUser/internal/web/actions/default/api/init.go
Normal file
@@ -0,0 +1,30 @@
|
||||
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeUser/internal/web/actions/default/api/pay/alipay"
|
||||
serversapi "github.com/TeaOSLab/EdgeUser/internal/web/actions/default/api/servers"
|
||||
domainsapi "github.com/TeaOSLab/EdgeUser/internal/web/actions/default/api/servers/domains"
|
||||
"github.com/TeaOSLab/EdgeUser/internal/web/helpers"
|
||||
"github.com/iwind/TeaGo"
|
||||
)
|
||||
|
||||
func init() {
|
||||
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
||||
server.
|
||||
Prefix("/api").
|
||||
|
||||
// pay
|
||||
Post("/pay/alipay/notify", new(alipay.NotifyAction)).
|
||||
|
||||
// servers
|
||||
Helper(helpers.NewUserMustAuth("")).
|
||||
Post("/user/servers/list", new(serversapi.ServersListAction)).
|
||||
Post("/user/servers/domains/add", new(domainsapi.DomainsAddAction)).
|
||||
Post("/user/servers/domains/delete", new(domainsapi.DomainsDeleteAction)).
|
||||
|
||||
//
|
||||
EndAll()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user