🎨 Improve searching for move blocks

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-01 18:58:53 +08:00
parent 12ebc120a0
commit 190ab07b98
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 14 additions and 2 deletions

View file

@ -1034,8 +1034,16 @@ func searchDocs(c *gin.Context) {
flashcard = arg["flashcard"].(bool)
}
var excludeIDs []string
if arg["excludeIDs"] != nil {
excludeIDsArg := arg["excludeIDs"].([]interface{})
for _, excludeID := range excludeIDsArg {
excludeIDs = append(excludeIDs, excludeID.(string))
}
}
k := arg["k"].(string)
ret.Data = model.SearchDocsByKeyword(k, flashcard)
ret.Data = model.SearchDocsByKeyword(k, flashcard, excludeIDs)
}
func listDocsByPath(c *gin.Context) {