31 lines
920 B
Go
31 lines
920 B
Go
// 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()
|
|
})
|
|
}
|