1、示例报告改未登录可访问

2、增加代理推广报告查询注册UUID账户
This commit is contained in:
2025-05-11 19:39:56 +08:00
parent 9ec2e6c104
commit 972b10eeae
8 changed files with 222 additions and 85 deletions

View File

@@ -241,19 +241,22 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
)
server.AddRoutes(
[]rest.Route{
{
// query service agent
Method: http.MethodPost,
Path: "/query/service_agent/:product",
Handler: query.QueryServiceAgentHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/query/service_app/:product",
Handler: query.QueryServiceAppHandler(serverCtx),
},
},
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.AuthInterceptor},
[]rest.Route{
{
// query service agent
Method: http.MethodPost,
Path: "/query/service_agent/:product",
Handler: query.QueryServiceAgentHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/query/service_app/:product",
Handler: query.QueryServiceAppHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1"),
)
@@ -272,12 +275,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
[]rest.Route{
{
// 查询示例
Method: http.MethodGet,
Path: "/query/example",
Handler: query.QueryExampleHandler(serverCtx),
},
{
// 查询列表
Method: http.MethodGet,
@@ -327,6 +324,12 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/query/:id",
Handler: query.QueryDetailHandler(serverCtx),
},
{
// 查询示例
Method: http.MethodGet,
Path: "/query/example",
Handler: query.QueryExampleHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/query/single/test",