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

Function GetRedemption

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

Source from the content-addressed store, hash-verified

38}
39
40func 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
59func AddRedemption(c *gin.Context) {
60 redemption := model.Redemption{}

Callers

nothing calls this directly

Calls 2

ApiErrorFunction · 0.92
GetRedemptionByIdFunction · 0.92

Tested by

no test coverage detected