package router

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

// 需认证的路由代码
func registerStoreManageRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	store := v1.Group("/store").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
	{
		store.POST("/list", storemanage.StoreList)
	}

}

// 无需认证的路由代码
func registerStoreManageUnAuthRouter(v1 *gin.RouterGroup) {
	store := v1.Group("/store")
	{
		//store.POST("/list", storemanage.StoreList)
		store.POST("/add", storemanage.StoreAdd)
		store.POST("/modify", storemanage.StoreModify)
		store.POST("/del", storemanage.StoreDel)
	}
}
