🎨 改进删除闪卡

This commit is contained in:
Liang Ding 2023-02-24 19:58:10 +08:00
parent 0c09b08214
commit fe9abe4b4b
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 2 additions and 2 deletions

View file

@ -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()

View file

@ -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()