Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 改进删除闪卡

Liang Dingfe9abe4b4b92
diff --git a/kernel/api/riff.go b/kernel/api/riff.go
index 68f445cecf..0cc51928b8 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 8487d15ae9..e254b69dcb 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()