1
This commit is contained in:
parent
1b4ff79bdc
commit
7daa6700bc
@ -20,8 +20,8 @@ type RechargeApi struct {
|
||||
}
|
||||
|
||||
func (ea *RechargeApi) RechargeList(c *gin.Context) {
|
||||
accountAddress := strings.ToLower(c.Param("account_address"))
|
||||
netId := q5.ToInt32(c.DefaultQuery("net_id", ""))
|
||||
accountAddress := c.DefaultQuery("account_address", "")
|
||||
rspObj := struct {
|
||||
ErrCode int32 `json:"errcode"`
|
||||
ErrMsg string `json:"errmsg"`
|
||||
@ -118,7 +118,7 @@ func (this *RechargeApi) internalBuy(c *gin.Context,
|
||||
f5.RspErr(c, 2, "server internal error")
|
||||
return
|
||||
}
|
||||
currencyContractMeta := mt.Table.Contract.GetByNetIdName(netId, currencyMeta.GetCurrencyName())
|
||||
currencyContractMeta := currencyMeta.GetContract()
|
||||
if currencyContractMeta == nil {
|
||||
f5.RspErr(c, 2, "server internal error")
|
||||
return
|
||||
|
@ -11,7 +11,7 @@ type RechargeRouter struct{}
|
||||
func (er *RechargeRouter) InitRouter() {
|
||||
api := v1.ApiGroupApp.RechargeApiGroup
|
||||
f5.GetApp().GetGinEngine().POST("/api/recharge/history/:net_id/:account_address", api.RechargeApi.RechargeQuery)
|
||||
f5.GetApp().GetGinEngine().GET("/api/recharge/goods", middleware.JwtAuth, api.RechargeApi.RechargeList)
|
||||
f5.GetApp().GetGinEngine().GET("/api/recharge/goods", api.RechargeApi.RechargeList)
|
||||
f5.GetApp().GetGinEngine().POST("/api/recharge/buy", middleware.JwtAuth, api.RechargeApi.Buy)
|
||||
f5.GetApp().GetGinEngine().POST("/api/recharge/buy_with_email", middleware.JwtAuth, api.RechargeApi.BuyWithEmail)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user