gas_cylinder_allot.go 827 B

1234567891011121314151617181920212223242526272829
  1. package router
  2. import (
  3. "gas-cylinder-api/app/admin/controller"
  4. "gas-cylinder-api/common/actions"
  5. "github.com/gin-gonic/gin"
  6. jwt "gogs.baozhida.cn/zoie/OAuth-core/pkg/jwtauth"
  7. )
  8. func init() {
  9. routerCheckRole = append(routerCheckRole, registerGasCylinderAllotRouter)
  10. }
  11. // 派费管理
  12. // 需认证的路由代码
  13. func registerGasCylinderAllotRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
  14. cont := controller.GasCylinderAllotController{}
  15. r := v1.Group("/gas-cylinder-allot").Use(authMiddleware.MiddlewareFunc()).Use(actions.PermissionAction())
  16. {
  17. r.GET("", cont.GetPage)
  18. r.GET("/:id", cont.Get)
  19. r.GET("/opt-type/:optType", cont.GetByOptType)
  20. r.POST("", cont.Insert)
  21. r.POST("/cancel", cont.Cancel)
  22. r.POST("/submit", cont.Submit)
  23. r.PUT("", cont.Update)
  24. r.DELETE("", cont.Delete)
  25. }
  26. }