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

import (
	"net/http"

	basic "go-cms/app/basic/cmd/api/internal/handler/basic"
	"go-cms/app/basic/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:    "/basic/fileList",
				Handler: basic.FileListHandler(serverCtx),
			},
			{
				Method:  http.MethodPost,
				Path:    "/basic/fileDetail",
				Handler: basic.FileDetailHandler(serverCtx),
			},
			{
				Method:  http.MethodPost,
				Path:    "/basic/upload",
				Handler: basic.UploadHandler(serverCtx),
			},
			{
				Method:  http.MethodPost,
				Path:    "/basic/getFileByKey",
				Handler: basic.GetFileByKeyHandler(serverCtx),
			},
		},
		rest.WithPrefix("/basic/v1"),
	)

	server.AddRoutes(
		[]rest.Route{
			{
				Method:  http.MethodPost,
				Path:    "/basic/myFileList",
				Handler: basic.MyFileListHandler(serverCtx),
			},
			{
				Method:  http.MethodPost,
				Path:    "/basic/delFileList",
				Handler: basic.DelFileListHandler(serverCtx),
			},
		},
		rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
		rest.WithPrefix("/basic/v1"),
	)
}
