(c *gin.Context)
| 11 | ) |
| 12 | |
| 13 | func 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 | |
| 26 | func SearchRedemptions(c *gin.Context) { |
| 27 | keyword := c.Query("keyword") |
nothing calls this directly
no test coverage detected