🎨 Subdocuments created by the database are not displayed in the doc tree https://github.com/siyuan-note/siyuan/issues/9091

This commit is contained in:
Daniel 2023-09-05 15:50:13 +08:00
parent 830c8b55cf
commit 756d1ed4c0
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 24 additions and 13 deletions

View file

@ -481,6 +481,12 @@ func createDocWithMd(c *gin.Context) {
parentID = parentIDArg.(string)
}
showInDocTree := true
showInDocTreeArg := arg["showInDocTree"]
if nil != showInDocTreeArg {
showInDocTree = showInDocTreeArg.(bool)
}
hPath := arg["path"].(string)
markdown := arg["markdown"].(string)
@ -496,7 +502,7 @@ func createDocWithMd(c *gin.Context) {
hPath = "/" + hPath
}
id, err := model.CreateWithMarkdown(notebook, hPath, markdown, parentID)
id, err := model.CreateWithMarkdown(notebook, hPath, markdown, parentID, showInDocTree)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()