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

Function SearchRedemptions

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

Source from the content-addressed store, hash-verified

24}
25
26func SearchRedemptions(c *gin.Context) {
27 keyword := c.Query("keyword")
28 pageInfo := common.GetPageQuery(c)
29 redemptions, total, err := model.SearchRedemptions(keyword, pageInfo.GetStartIdx(), pageInfo.GetPageSize())
30 if err != nil {
31 common.ApiError(c, err)
32 return
33 }
34 pageInfo.SetTotal(int(total))
35 pageInfo.SetItems(redemptions)
36 common.ApiSuccess(c, pageInfo)
37 return
38}
39
40func GetRedemption(c *gin.Context) {
41 id, err := strconv.Atoi(c.Param("id"))

Callers

nothing calls this directly

Calls 8

GetPageQueryFunction · 0.92
SearchRedemptionsFunction · 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