12345678910111213141516171819 |
- package router
- import (
- "gin-vue-admin/controller/api"
- "gin-vue-admin/middleware"
- "github.com/gin-gonic/gin"
- )
- func InitApiRouter(Router *gin.RouterGroup) {
- ApiRouter := Router.Group("api").Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
- {
- ApiRouter.POST("createApi", api.CreateApi)
- ApiRouter.POST("deleteApi", api.DeleteApi)
- ApiRouter.POST("getApiList", api.GetApiList)
- ApiRouter.POST("getApiById", api.GetApiById)
- ApiRouter.POST("updataApi", api.UpdataApi)
- ApiRouter.POST("getAllApis", api.GetAllApis)
- }
- }
|