You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
641 B
19 lines
641 B
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) //创建Api
|
|
ApiRouter.POST("deleteApi", api.DeleteApi) //删除Api
|
|
ApiRouter.POST("getApiList", api.GetApiList) //获取Api列表
|
|
ApiRouter.POST("getApiById", api.GetApiById) //获取单条Api消息
|
|
ApiRouter.POST("updataApi", api.UpdataApi) //更新api
|
|
ApiRouter.POST("getAllApis", api.GetAllApis) // 获取所有api
|
|
}
|
|
}
|