package router

import (
	"github.com/gin-gonic/gin"
	"go-admin/app/admin/apis/basic"
	"go-admin/app/admin/middleware"
	jwt "go-admin/pkg/jwtauth"
)

func registerCategoryRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	r := v1.Group("/category").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
	r.POST("create", basic.CreateCategory)
	r.POST("update", basic.UpdateCategory)
	r.POST("delete", basic.DeleteCategory)
	r.POST("list", basic.CategoryList)
	r.POST("display", basic.CategoryDisplay)
	r.POST("import_category_view", basic.CategoryImportView)
	r.POST("import_category", basic.CategoryImport)
}
