添加banner的接口逻辑
This commit is contained in:
1 parent
e42a4549e9
commit
a52d630acf
8 files changed
+505
-5
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
|
||||
|
||||
"go-admin/app/jbxh/apis"
|
||||
"go-admin/common/actions"
|
||||
"go-admin/common/middleware"
|
||||
)
|
||||
|
||||
func init() {
|
||||
routerCheckRole = append(routerCheckRole, registerBannerRouter)
|
||||
}
|
||||
|
||||
// registerBannerRouter
|
||||
func registerBannerRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
|
||||
api := apis.Banner{}
|
||||
r := v1.Group("/banner").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
|
||||
{
|
||||
r.GET("", actions.PermissionAction(), api.GetPage)
|
||||
r.GET("/:id", actions.PermissionAction(), api.Get)
|
||||
r.POST("", api.Insert)
|
||||
r.PUT("/:id", actions.PermissionAction(), api.Update)
|
||||
r.DELETE("", api.Delete)
|
||||
}
|
||||
f := v1.Group("")
|
||||
{
|
||||
f.GET("/fe/banner", api.GetPage)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user