routes.go 894 字节
// Code generated by goctl. DO NOT EDIT.
package handler

import (
	"net/http"

	comment "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/handler/comment"
	"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/svc"

	"github.com/zeromicro/go-zero/rest"
)

func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
	server.AddRoutes(
		[]rest.Route{
			{
				Method:  http.MethodGet,
				Path:    "/mini/comment",
				Handler: comment.MiniCommentHandler(serverCtx),
			},
		},
		rest.WithJwt(serverCtx.Config.MiniAuth.AccessSecret),
		rest.WithPrefix("/v1"),
	)

	server.AddRoutes(
		[]rest.Route{
			{
				Method:  http.MethodGet,
				Path:    "/system/comment",
				Handler: comment.SystemCommentHandler(serverCtx),
			},
		},
		rest.WithJwt(serverCtx.Config.SystemAuth.AccessSecret),
		rest.WithPrefix("/v1"),
	)
}