mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
🎨 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:
parent
e99852f067
commit
ba8b07f64c
2 changed files with 14 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue