mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
This commit is contained in:
parent
1c4c0c5192
commit
ebca9c64e1
4 changed files with 36 additions and 46 deletions
|
|
@ -35,10 +35,10 @@ func reviewRiffCard(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
deckName := arg["deck"].(string)
|
||||
deckID := arg["deckID"].(string)
|
||||
blockID := arg["blockID"].(string)
|
||||
rating := int(arg["rating"].(float64))
|
||||
err := model.ReviewFlashcard(deckName, blockID, riff.Rating(rating))
|
||||
err := model.ReviewFlashcard(deckID, blockID, riff.Rating(rating))
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
@ -55,9 +55,9 @@ func getRiffDueCards(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
deckName := arg["deck"].(string)
|
||||
deckID := arg["deckID"].(string)
|
||||
|
||||
cards, err := model.GetDueFlashcards(deckName)
|
||||
cards, err := model.GetDueFlashcards(deckID)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
@ -76,9 +76,9 @@ func removeRiffCard(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
deckName := arg["deck"].(string)
|
||||
deckID := arg["deckID"].(string)
|
||||
blockID := arg["blockID"].(string)
|
||||
err := model.RemoveFlashcard(blockID, deckName)
|
||||
err := model.RemoveFlashcard(blockID, deckID)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
@ -95,9 +95,9 @@ func addRiffCard(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
deckName := arg["deck"].(string)
|
||||
deckID := arg["deckID"].(string)
|
||||
blockID := arg["blockID"].(string)
|
||||
err := model.AddFlashcard(blockID, deckName)
|
||||
err := model.AddFlashcard(blockID, deckID)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue