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.
27 lines
1.0 KiB
27 lines
1.0 KiB
package system
|
|
|
|
import (
|
|
v1 "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
|
|
"github.com/flipped-aurora/gin-vue-admin/server/middleware"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type ApiRouter struct {
|
|
}
|
|
|
|
func (s *ApiRouter) InitApiRouter(Router *gin.RouterGroup) {
|
|
apiRouter := Router.Group("api").Use(middleware.OperationRecord())
|
|
apiRouterWithoutRecord := Router.Group("api")
|
|
var apiRouterApi = v1.ApiGroupApp.SystemApiGroup.SystemApiApi
|
|
{
|
|
apiRouter.POST("createApi", apiRouterApi.CreateApi) // 创建Api
|
|
apiRouter.POST("deleteApi", apiRouterApi.DeleteApi) // 删除Api
|
|
apiRouter.POST("getApiById", apiRouterApi.GetApiById) // 获取单条Api消息
|
|
apiRouter.POST("updateApi", apiRouterApi.UpdateApi) // 更新api
|
|
apiRouter.DELETE("deleteApisByIds", apiRouterApi.DeleteApisByIds) // 删除选中api
|
|
}
|
|
{
|
|
apiRouterWithoutRecord.POST("getAllApis", apiRouterApi.GetAllApis) // 获取所有api
|
|
apiRouterWithoutRecord.POST("getApiList", apiRouterApi.GetApiList) // 获取Api列表
|
|
}
|
|
}
|