1
This commit is contained in:
parent
c0e36c7c52
commit
9189386f19
@ -6,6 +6,7 @@ import (
|
|||||||
"main/common"
|
"main/common"
|
||||||
"main/vo"
|
"main/vo"
|
||||||
"main/model"
|
"main/model"
|
||||||
|
"main/mt"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -38,5 +39,10 @@ func (this *ActivityApi) RollDice(c *gin.Context) {
|
|||||||
vo.BaseVo
|
vo.BaseVo
|
||||||
Point int32 `json:"point"`
|
Point int32 `json:"point"`
|
||||||
}{}
|
}{}
|
||||||
|
rewardMeta := mt.Table.Reward.RandElement()
|
||||||
|
if rewardMeta == nil {
|
||||||
|
f5.RspErr(c, 500, "server internal error")
|
||||||
|
return
|
||||||
|
}
|
||||||
c.JSON(200, rspObj)
|
c.JSON(200, rspObj)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user