mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
This commit is contained in:
parent
26e9c3a4c6
commit
28485f7ffb
3 changed files with 46 additions and 0 deletions
|
|
@ -26,6 +26,28 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func renderRiffCard(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
blockID := arg["blockID"].(string)
|
||||
content, err := model.RenderFlashcard(blockID)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
ret.Data = map[string]interface{}{
|
||||
"content": content,
|
||||
}
|
||||
}
|
||||
|
||||
func reviewRiffCard(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue