mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Add kernel API /api/riff/getRiffCardsByBlockIDs Fix https://github.com/siyuan-note/siyuan/issues/10535
This commit is contained in:
parent
e083dacca8
commit
fd709b99b7
2 changed files with 22 additions and 11 deletions
|
|
@ -40,17 +40,10 @@ func getRiffCardsByBlockIDs(c *gin.Context) {
|
|||
for _, blockID := range blockIDsArg {
|
||||
blockIDs = append(blockIDs, blockID.(string))
|
||||
}
|
||||
page := int(arg["page"].(float64))
|
||||
pageSize := 20
|
||||
if nil != arg["pageSize"] {
|
||||
pageSize = int(arg["pageSize"].(float64))
|
||||
}
|
||||
|
||||
blocks, total, pageCount := model.GetFlashcardsByBlockIDs(blockIDs, page, pageSize)
|
||||
blocks := model.GetFlashcardsByBlockIDs(blockIDs)
|
||||
ret.Data = map[string]interface{}{
|
||||
"blocks": blocks,
|
||||
"total": total,
|
||||
"pageCount": pageCount,
|
||||
"blocks": blocks,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue