This commit is contained in:
Liang Ding 2023-02-27 09:46:39 +08:00
parent 990b31dc00
commit 73ec3714cc
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 96 additions and 33 deletions

View file

@ -85,6 +85,26 @@ func reviewRiffCard(c *gin.Context) {
}
}
func getNotebookRiffDueCards(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
arg, ok := util.JsonArg(c, ret)
if !ok {
return
}
notebookID := arg["notebook"].(string)
cards, err := model.GetNotebookDueFlashcards(notebookID)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
return
}
ret.Data = cards
}
func getTreeRiffDueCards(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)