mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🎨 支持基于文档复习闪卡 https://github.com/siyuan-note/siyuan/issues/7057
This commit is contained in:
parent
83777a14ed
commit
7dd6d1654d
3 changed files with 92 additions and 0 deletions
|
|
@ -27,6 +27,25 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func getTreeRiffCards(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
rootID := arg["rootID"].(string)
|
||||
page := int(arg["page"].(float64))
|
||||
blockIDs, total, pageCount := model.GetTreeFlashcards(rootID, page)
|
||||
ret.Data = map[string]interface{}{
|
||||
"blocks": blockIDs,
|
||||
"total": total,
|
||||
"pageCount": pageCount,
|
||||
}
|
||||
}
|
||||
|
||||
func getRiffCards(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue