This commit is contained in:
2026-03-02 12:57:17 +08:00
45 changed files with 1788 additions and 246 deletions

View File

@@ -22,6 +22,7 @@ import (
app "qnc-server/app/main/api/internal/handler/app"
auth "qnc-server/app/main/api/internal/handler/auth"
authorization "qnc-server/app/main/api/internal/handler/authorization"
captcha "qnc-server/app/main/api/internal/handler/captcha"
notification "qnc-server/app/main/api/internal/handler/notification"
pay "qnc-server/app/main/api/internal/handler/pay"
product "qnc-server/app/main/api/internal/handler/product"
@@ -104,7 +105,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
},
{
Method: http.MethodPost,
Path: "/upgrade",
Path: "/upgrade/agent",
Handler: admin_agent.AdminUpgradeAgentHandler(serverCtx),
},
{
@@ -661,6 +662,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/info",
Handler: agent.GetAgentInfoHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/invite/poster",
Handler: agent.GenerateInvitePosterHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/invite_code/delete",
@@ -786,6 +792,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/withdrawal/apply",
Handler: agent.ApplyWithdrawalHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/withdrawal/last_info",
Handler: agent.GetLastWithdrawalInfoHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/withdrawal/list",
@@ -862,6 +873,18 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
rest.WithPrefix("/api/v1"),
)
server.AddRoutes(
[]rest.Route{
{
// get encrypted scene id for aliyun captcha
Method: http.MethodPost,
Path: "/captcha/encryptedSceneId",
Handler: captcha.GetEncryptedSceneIdHandler(serverCtx),
},
},
rest.WithPrefix("/api/v1"),
)
server.AddRoutes(
[]rest.Route{
{