🎨 Supports creating different docs when the database primary key content is the same https://github.com/siyuan-note/siyuan/issues/11713

This commit is contained in:
Daniel 2024-06-15 21:47:49 +08:00
parent e99852f067
commit ba8b07f64c
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 14 additions and 5 deletions

View file

@ -341,11 +341,16 @@ func searchRefBlock(c *gin.Context) {
isSquareBrackets = isSquareBracketsArg.(bool)
}
isDatabase := false
if isDatabaseArg := arg["isDatabase"]; nil != isDatabaseArg {
isDatabase = isDatabaseArg.(bool)
}
rootID := arg["rootID"].(string)
id := arg["id"].(string)
keyword := arg["k"].(string)
beforeLen := int(arg["beforeLen"].(float64))
blocks, newDoc := model.SearchRefBlock(id, rootID, keyword, beforeLen, isSquareBrackets)
blocks, newDoc := model.SearchRefBlock(id, rootID, keyword, beforeLen, isSquareBrackets, isDatabase)
ret.Data = map[string]interface{}{
"blocks": blocks,
"newDoc": newDoc,