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
627 B

  1. package router
  2. import (
  3. "gin-vue-admin/api/v1"
  4. "gin-vue-admin/middleware"
  5. "github.com/gin-gonic/gin"
  6. )
  7. func InitApiRouter(Router *gin.RouterGroup) {
  8. ApiRouter := Router.Group("api").Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
  9. {
  10. ApiRouter.POST("createApi", v1.CreateApi) //创建Api
  11. ApiRouter.POST("deleteApi", v1.DeleteApi) //删除Api
  12. ApiRouter.POST("getApiList", v1.GetApiList) //获取Api列表
  13. ApiRouter.POST("getApiById", v1.GetApiById) //获取单条Api消息
  14. ApiRouter.POST("updateApi", v1.UpdateApi) //更新api
  15. ApiRouter.POST("getAllApis", v1.GetAllApis) // 获取所有api
  16. }
  17. }