(c *gin.Context)
| 24 | } |
| 25 | |
| 26 | func 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 | |
| 40 | func GetRedemption(c *gin.Context) { |
| 41 | id, err := strconv.Atoi(c.Param("id")) |
nothing calls this directly
no test coverage detected