// Code generated by goctl. DO NOT EDIT.
package handler

import (
	"net/http"

	cms "go-cms/app/cms/cmd/api/internal/handler/cms"
	"go-cms/app/cms/cmd/api/internal/svc"

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

func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
	server.AddRoutes(
		[]rest.Route{
			{
				Method:  http.MethodPost,
				Path:    "/cms/artList",
				Handler: cms.ArtListHandler(serverCtx),
			},
			{
				Method:  http.MethodPost,
				Path:    "/cms/catList",
				Handler: cms.CatListHandler(serverCtx),
			},
			{
				Method:  http.MethodPost,
				Path:    "/cms/artDetail",
				Handler: cms.ArtDetailHandler(serverCtx),
			},
			{
				Method:  http.MethodPost,
				Path:    "/cms/discussList",
				Handler: cms.DiscussListHandler(serverCtx),
			},
		},
		rest.WithPrefix("/cms/v1"),
	)

	server.AddRoutes(
		[]rest.Route{
			{
				Method:  http.MethodPost,
				Path:    "/cms/discuss",
				Handler: cms.DiscussHandler(serverCtx),
			},
			{
				Method:  http.MethodPost,
				Path:    "/cms/delDiscuss",
				Handler: cms.DelDiscussHandler(serverCtx),
			},
		},
		rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
		rest.WithPrefix("/cms/v1"),
	)
}
