ot_app_dashboard.go 817 B

12345678910111213141516171819202122232425262728
  1. package router
  2. import (
  3. "github.com/gin-gonic/gin"
  4. jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
  5. "go-admin/app/admin/apis"
  6. "go-admin/common/middleware"
  7. )
  8. func init() {
  9. routerCheckRole = append(routerCheckRole, registerOtAppDashboardRouternoCheck)
  10. // routerNoCheckRole = append(routerNoCheckRole, registerOtAppDashboardRouternoCheck)
  11. }
  12. // registerOtAppDashboardRouter
  13. func registerOtAppDashboardRouternoCheck(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
  14. api := apis.OtAppDashboard{}
  15. r := v1.Group("/ot-app-dashboard").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
  16. {
  17. r.GET("", api.GetPage)
  18. r.GET("/:id", api.Get)
  19. r.POST("", api.Insert)
  20. r.PUT("/:id", api.Update)
  21. r.DELETE("", api.Delete)
  22. r.GET("/byapp/:appid", api.GetDashBoardByAppId)
  23. }
  24. }