(server *gin.Engine)
| 24 | } |
| 25 | |
| 26 | func (h *ApiHandler) RegisterRoutes(server *gin.Engine) { |
| 27 | apiGroup := server.Group("/api/apis") |
| 28 | |
| 29 | apiGroup.POST("/list", h.ListApis) |
| 30 | apiGroup.POST("/create", h.CreateAPI) |
| 31 | apiGroup.POST("/update", h.UpdateAPI) |
| 32 | apiGroup.DELETE("/:id", h.DeleteAPI) |
| 33 | } |
| 34 | |
| 35 | // ListApis 获取API列表 |
| 36 | func (a *ApiHandler) ListApis(c *gin.Context) { |