(c *gin.Context)
| 38 | } |
| 39 | |
| 40 | func GetRedemption(c *gin.Context) { |
| 41 | id, err := strconv.Atoi(c.Param("id")) |
| 42 | if err != nil { |
| 43 | common.ApiError(c, err) |
| 44 | return |
| 45 | } |
| 46 | redemption, err := model.GetRedemptionById(id) |
| 47 | if err != nil { |
| 48 | common.ApiError(c, err) |
| 49 | return |
| 50 | } |
| 51 | c.JSON(http.StatusOK, gin.H{ |
| 52 | "success": true, |
| 53 | "message": "", |
| 54 | "data": redemption, |
| 55 | }) |
| 56 | return |
| 57 | } |
| 58 | |
| 59 | func AddRedemption(c *gin.Context) { |
| 60 | redemption := model.Redemption{} |
nothing calls this directly
no test coverage detected