This commit is contained in:
liangzai 2025-05-09 19:44:54 +08:00
parent d268234c1b
commit e43e76697b
2 changed files with 11 additions and 7 deletions

View File

@ -26,6 +26,7 @@ service main {
@server ( @server (
prefix: api/v1/product prefix: api/v1/product
group: product group: product
middleware: SourceInterceptor
) )
service main { service main {
@handler GetProductRenderList @handler GetProductRenderList

View File

@ -304,13 +304,16 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
) )
server.AddRoutes( server.AddRoutes(
[]rest.Route{ rest.WithMiddlewares(
{ []rest.Middleware{serverCtx.SourceInterceptor},
Method: http.MethodGet, []rest.Route{
Path: "/render_list/:module", {
Handler: product.GetProductRenderListHandler(serverCtx), Method: http.MethodGet,
}, Path: "/render_list/:module",
}, Handler: product.GetProductRenderListHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/product"), rest.WithPrefix("/api/v1/product"),
) )