123456789101112131415161718192021222324252627 |
- 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() {
- routerCheckRole = append(routerCheckRole, registerWarehouseRouter)
- }
- // 派费管理
- // 需认证的路由代码
- func registerWarehouseRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
- cont := controller.WarehouseController{}
- r := v1.Group("/warehouse").Use(authMiddleware.MiddlewareFunc()).Use(actions.PermissionAction())
- {
- r.GET("", cont.GetPage)
- r.GET("/:id", cont.Get)
- r.POST("", cont.Insert)
- r.POST("/import", cont.BatchInsert)
- r.PUT("", cont.Update)
- r.DELETE("", cont.Delete)
- }
- }
|