This commit is contained in:
Liang Ding 2022-12-29 21:46:35 +08:00
parent c4ba046898
commit 7d450f88eb
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 26 additions and 4 deletions

View file

@ -27,7 +27,7 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func searchRiffCards(c *gin.Context) {
func getRiffCards(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
@ -37,7 +37,8 @@ func searchRiffCards(c *gin.Context) {
}
deckID := arg["deckID"].(string)
blockIDs := model.SearchFlashcard(deckID)
page := int(arg["page"].(float64))
blockIDs := model.GetFlashcards(deckID, page)
ret.Data = map[string]interface{}{
"blockIDs": blockIDs,
}