tianyuan-api-server/apps/index/internal/handler/routes.go

32 lines
639 B
Go
Raw Normal View History

2024-10-02 22:10:58 +08:00
// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.2
package handler
import (
"net/http"
product "tianyuan-api/apps/index/internal/handler/product"
"tianyuan-api/apps/index/internal/svc"
"github.com/zeromicro/go-zero/rest"
)
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
[]rest.Route{
{
Method: http.MethodGet,
Path: "/:productId",
Handler: product.GetProductByIdHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/list",
Handler: product.GetProductListHandler(serverCtx),
},
},
rest.WithPrefix("/api/index/product"),
)
}