package router import ( "cold-logistics/app/admin/controller" "cold-logistics/common/actions" "github.com/gin-gonic/gin" jwt "gogs.baozhida.cn/zoie/OAuth-core/pkg/jwtauth" ) func init() { routerNoCheckRole = append(routerNoCheckRole, registerWaybillLogisticsRouter) routerCheckRole = append(routerCheckRole, registerWaybillLogisticsRouter2) } // 物流详情 // 需认证的路由代码 func registerWaybillLogisticsRouter(v1 *gin.RouterGroup) { cont := controller.WaybillLogisticsController{} r := v1.Group("/waybill-logistics") { r.GET("", cont.GetPage) } } func registerWaybillLogisticsRouter2(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) { cont := controller.WaybillLogisticsController{} r := v1.Group("/waybill-logistics").Use(authMiddleware.MiddlewareFunc()).Use(actions.PermissionAction()) { r.PUT("", cont.Update) } }