1
This commit is contained in:
parent
78462ed1a1
commit
46a03910a7
@ -34,7 +34,9 @@ func (this *InGameApi) HeroList(c *gin.Context) {
|
||||
f5.RspErr(c, 401, "params parse error")
|
||||
return
|
||||
}
|
||||
err, heroList := GetCacheMgr().GetIngameHero("")
|
||||
openId := c.MustGet("open_id").(string)
|
||||
accountId := openId
|
||||
err, heroList := GetCacheMgr().GetIngameHero(accountId)
|
||||
if err != nil {
|
||||
f5.RspErr(c, 500, "server internal error")
|
||||
return
|
||||
|
@ -3,12 +3,17 @@ package ingame
|
||||
import (
|
||||
"f5"
|
||||
"main/api/v1"
|
||||
"main/middleware"
|
||||
)
|
||||
|
||||
type IngameRouter struct{}
|
||||
|
||||
func (this *IngameRouter) InitRouter() {
|
||||
api := v1.ApiGroupApp.InGameApiGroup
|
||||
f5.GetApp().GetGinEngine().GET("/api/ingame/asset/hero/list", api.InGameApi.HeroList)
|
||||
f5.GetApp().GetGinEngine().POST("/api/ingame/asset/hero/mint", api.InGameApi.HeroMint)
|
||||
f5.GetApp().GetGinEngine().POST("/api/ingame/asset/hero/list",
|
||||
middleware.JwtAuth,
|
||||
api.InGameApi.HeroList)
|
||||
f5.GetApp().GetGinEngine().POST("/api/ingame/asset/hero/mint",
|
||||
middleware.JwtAuth,
|
||||
api.InGameApi.HeroMint)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user