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")
|
f5.RspErr(c, 401, "params parse error")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err, heroList := GetCacheMgr().GetIngameHero("")
|
openId := c.MustGet("open_id").(string)
|
||||||
|
accountId := openId
|
||||||
|
err, heroList := GetCacheMgr().GetIngameHero(accountId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
f5.RspErr(c, 500, "server internal error")
|
f5.RspErr(c, 500, "server internal error")
|
||||||
return
|
return
|
||||||
|
@ -3,12 +3,17 @@ package ingame
|
|||||||
import (
|
import (
|
||||||
"f5"
|
"f5"
|
||||||
"main/api/v1"
|
"main/api/v1"
|
||||||
|
"main/middleware"
|
||||||
)
|
)
|
||||||
|
|
||||||
type IngameRouter struct{}
|
type IngameRouter struct{}
|
||||||
|
|
||||||
func (this *IngameRouter) InitRouter() {
|
func (this *IngameRouter) InitRouter() {
|
||||||
api := v1.ApiGroupApp.InGameApiGroup
|
api := v1.ApiGroupApp.InGameApiGroup
|
||||||
f5.GetApp().GetGinEngine().GET("/api/ingame/asset/hero/list", api.InGameApi.HeroList)
|
f5.GetApp().GetGinEngine().POST("/api/ingame/asset/hero/list",
|
||||||
f5.GetApp().GetGinEngine().POST("/api/ingame/asset/hero/mint", api.InGameApi.HeroMint)
|
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