package router

import (
	"cold-delivery/common/middleware"
	"github.com/gin-gonic/gin"

	"cold-delivery/app/admin/controller"
	jwt "gogs.baozhida.cn/zoie/OAuth-core/pkg/jwtauth"
)

func init() {
	routerCheckRole = append(routerCheckRole, registerSysLoginLogRouter)
}

// 需认证的路由代码
func registerSysLoginLogRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	cont := controller.SysLoginLogController{}

	r := v1.Group("/sys-login-log").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
	{
		r.GET("", cont.GetPage)
		r.GET("/:id", cont.Get)
		r.DELETE("", cont.Delete)
	}
}
