MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / GetAllRedemptions

Function GetAllRedemptions

controller/redemption.go:13–24  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

11)
12
13func GetAllRedemptions(c *gin.Context) {
14 pageInfo := common.GetPageQuery(c)
15 redemptions, total, err := model.GetAllRedemptions(pageInfo.GetStartIdx(), pageInfo.GetPageSize())
16 if err != nil {
17 common.ApiError(c, err)
18 return
19 }
20 pageInfo.SetTotal(int(total))
21 pageInfo.SetItems(redemptions)
22 common.ApiSuccess(c, pageInfo)
23 return
24}
25
26func SearchRedemptions(c *gin.Context) {
27 keyword := c.Query("keyword")

Callers

nothing calls this directly

Calls 8

GetPageQueryFunction · 0.92
GetAllRedemptionsFunction · 0.92
ApiErrorFunction · 0.92
ApiSuccessFunction · 0.92
GetStartIdxMethod · 0.80
GetPageSizeMethod · 0.80
SetTotalMethod · 0.80
SetItemsMethod · 0.80

Tested by

no test coverage detected