sys_opera_log.go 625 B

123456789101112131415161718192021222324
  1. package router
  2. import (
  3. "cold-logistics/common/middleware"
  4. "github.com/gin-gonic/gin"
  5. "cold-logistics/app/admin/controller"
  6. jwt "gogs.baozhida.cn/zoie/OAuth-core/pkg/jwtauth"
  7. )
  8. func init() {
  9. routerCheckRole = append(routerCheckRole, registerSysOperaLogRouter)
  10. }
  11. // 需认证的路由代码
  12. func registerSysOperaLogRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
  13. cont := controller.SysOperaLogController{}
  14. r := v1.Group("/sys-opera-log").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
  15. {
  16. r.GET("", cont.GetPage)
  17. r.GET("/:id", cont.Get)
  18. r.DELETE("", cont.Delete)
  19. }
  20. }