package router import ( "gas-cylinder-api/app/admin/controller" "gas-cylinder-api/common/actions" "github.com/gin-gonic/gin" jwt "gogs.baozhida.cn/zoie/OAuth-core/pkg/jwtauth" ) func init() { routerCheckRole = append(routerCheckRole, registerGasCylinderAllotRouter) } // 派费管理 // 需认证的路由代码 func registerGasCylinderAllotRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) { cont := controller.GasCylinderAllotController{} r := v1.Group("/gas-cylinder-allot").Use(authMiddleware.MiddlewareFunc()).Use(actions.PermissionAction()) { r.GET("", cont.GetPage) r.GET("/:id", cont.Get) r.GET("/opt-type/:optType", cont.GetByOptType) r.POST("", cont.Insert) r.POST("/cancel", cont.Cancel) r.POST("/submit", cont.Submit) r.PUT("", cont.Update) r.DELETE("", cont.Delete) } }