MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / ListPage

Method ListPage

controller/publish/iml.go:109–124  ·  view source on GitHub ↗
(ctx *gin.Context, serviceId string, page, pageSize string)

Source from the content-addressed store, hash-verified

107}
108
109func (c *imlPublishController) ListPage(ctx *gin.Context, serviceId string, page, pageSize string) ([]*dto.Publish, int, int, int64, error) {
110 pageNum, _ := strconv.Atoi(page)
111 pageSizeNum, _ := strconv.Atoi(pageSize)
112 if pageNum < 1 {
113 pageNum = 1
114 }
115 if pageSizeNum <= 0 {
116 pageSizeNum = 50
117 }
118 list, total, err := c.publishModule.List(ctx, serviceId, pageNum, pageSizeNum)
119 if err != nil {
120 return nil, 0, 0, 0, err
121 }
122
123 return list, pageNum, pageSizeNum, total, nil
124}
125
126func (c *imlPublishController) Detail(ctx *gin.Context, serviceId string, id string) (*dto.PublishDetail, error) {
127 return c.publishModule.Detail(ctx, serviceId, id)

Callers

nothing calls this directly

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected