mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 改进删除闪卡
This commit is contained in:
parent
0c09b08214
commit
fe9abe4b4b
2 changed files with 2 additions and 2 deletions
|
|
@ -142,7 +142,7 @@ func removeRiffCards(c *gin.Context) {
|
||||||
for _, blockID := range blockIDsArg {
|
for _, blockID := range blockIDsArg {
|
||||||
blockIDs = append(blockIDs, blockID.(string))
|
blockIDs = append(blockIDs, blockID.(string))
|
||||||
}
|
}
|
||||||
err := model.RemoveFlashcards(deckID, blockIDs)
|
err := model.RemoveFlashcardsByBlockIDs(deckID, blockIDs)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
ret.Code = -1
|
ret.Code = -1
|
||||||
ret.Msg = err.Error()
|
ret.Msg = err.Error()
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ func getAllDueFlashcards() (ret []*Flashcard) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func RemoveFlashcards(deckID string, blockIDs []string) (err error) {
|
func RemoveFlashcardsByBlockIDs(deckID string, blockIDs []string) (err error) {
|
||||||
deckLock.Lock()
|
deckLock.Lock()
|
||||||
defer deckLock.Unlock()
|
defer deckLock.Unlock()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue