This commit is contained in:
Liang Ding 2022-10-25 14:41:29 +08:00
parent 65921ad6d7
commit 420693197d
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 43 additions and 0 deletions

View file

@ -321,6 +321,20 @@ func getBlockBreadcrumb(c *gin.Context) {
ret.Data = blockPath
}
func getBlockIndex(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
arg, ok := util.JsonArg(c, ret)
if !ok {
return
}
id := arg["id"].(string)
index := model.GetBlockIndex(id)
ret.Data = index
}
func getBlockInfo(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)