diff --git a/kernel/api/riff.go b/kernel/api/riff.go index 68f445cec..0cc51928b 100644 --- a/kernel/api/riff.go +++ b/kernel/api/riff.go @@ -142,7 +142,7 @@ func removeRiffCards(c *gin.Context) { for _, blockID := range blockIDsArg { blockIDs = append(blockIDs, blockID.(string)) } - err := model.RemoveFlashcards(deckID, blockIDs) + err := model.RemoveFlashcardsByBlockIDs(deckID, blockIDs) if nil != err { ret.Code = -1 ret.Msg = err.Error() diff --git a/kernel/model/flashcard.go b/kernel/model/flashcard.go index 8487d15ae..e254b69dc 100644 --- a/kernel/model/flashcard.go +++ b/kernel/model/flashcard.go @@ -372,7 +372,7 @@ func getAllDueFlashcards() (ret []*Flashcard) { return } -func RemoveFlashcards(deckID string, blockIDs []string) (err error) { +func RemoveFlashcardsByBlockIDs(deckID string, blockIDs []string) (err error) { deckLock.Lock() defer deckLock.Unlock()