12345678910111213141516171819202122232425262728 |
- package router
- import (
- "github.com/gin-gonic/gin"
- jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
- "go-admin/app/admin/apis"
- "go-admin/common/middleware"
- )
- func init() {
- routerCheckRole = append(routerCheckRole, registerOtAppDashboardRouternoCheck)
- // routerNoCheckRole = append(routerNoCheckRole, registerOtAppDashboardRouternoCheck)
- }
- // registerOtAppDashboardRouter
- func registerOtAppDashboardRouternoCheck(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
- api := apis.OtAppDashboard{}
- r := v1.Group("/ot-app-dashboard").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
- {
- r.GET("", api.GetPage)
- r.GET("/:id", api.Get)
- r.POST("", api.Insert)
- r.PUT("/:id", api.Update)
- r.DELETE("", api.Delete)
- r.GET("/byapp/:appid", api.GetDashBoardByAppId)
- }
- }
|