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

Function GetRedemptionById

model/redemption.go:103–111  ·  view source on GitHub ↗
(id int)

Source from the content-addressed store, hash-verified

101}
102
103func GetRedemptionById(id int) (*Redemption, error) {
104 if id == 0 {
105 return nil, errors.New("id 为空!")
106 }
107 redemption := Redemption{Id: id}
108 var err error = nil
109 err = DB.First(&redemption, "id = ?", id).Error
110 return &redemption, err
111}
112
113func Redeem(key string, userId int) (quota int, err error) {
114 if key == "" {

Callers 2

GetRedemptionFunction · 0.92
UpdateRedemptionFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected