1
This commit is contained in:
parent
8055191421
commit
233a5e3ea6
@ -1,3 +1,4 @@
|
||||
{
|
||||
"gameapi_url": "https://game2006api-test.kingsome.cn"
|
||||
"gameapi_url": "https://game2006api-test.kingsome.cn",
|
||||
"jwks_uri": "https://auth.immutable.com/.well-known/jwks.json"
|
||||
}
|
||||
|
@ -39,8 +39,9 @@ func (this *ShopCartApi) List(c *gin.Context) {
|
||||
c.JSON(200, rspObj)
|
||||
return
|
||||
}
|
||||
cartDb := common.NewShopCart()
|
||||
nfts := []*common.NftDto{}
|
||||
if ds.Next() {
|
||||
cartDb := common.NewShopCart()
|
||||
if q5.DecodeJson(ds.GetByName("data"), cartDb) == nil {
|
||||
q5.Sort[common.ShopCartGoods](cartDb.Goods,
|
||||
func (a *common.ShopCartGoods, b *common.ShopCartGoods) bool{
|
||||
@ -89,6 +90,7 @@ func (this *ShopCartApi) List(c *gin.Context) {
|
||||
this.save(openId, cartDb)
|
||||
}
|
||||
}
|
||||
}
|
||||
GetCacheMgr().GetNfts(nfts)
|
||||
{
|
||||
for _, val := range nfts {
|
||||
|
@ -14,8 +14,8 @@ import (
|
||||
func JwtAuth(c *gin.Context) {
|
||||
tokenHeader := c.Request.Header.Get("Authorization")
|
||||
jwtToken := ""
|
||||
if len(tokenHeader) < 8 {
|
||||
jwtToken = tokenHeader[8:len(tokenHeader)]
|
||||
if len(tokenHeader) > 8 {
|
||||
jwtToken = tokenHeader[7:len(tokenHeader)]
|
||||
}
|
||||
|
||||
params := map[string]string{
|
||||
@ -62,7 +62,7 @@ func JwtAuth(c *gin.Context) {
|
||||
}
|
||||
rspObj.ErrCode = q5.SafeToInt32(jsonRspObj.ErrCode)
|
||||
rspObj.ErrMsg = jsonRspObj.ErrMsg
|
||||
if rspObj.ErrCode != 0 {
|
||||
if q5.SafeToInt32(rspObj.ErrCode) != 0 {
|
||||
rspObj.ErrCode = 501
|
||||
rspObj.ErrMsg = "jwt error"
|
||||
c.JSON(200, rspObj)
|
||||
|
Loading…
x
Reference in New Issue
Block a user