🎨 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 16:52:25 +08:00
parent 09f91258a1
commit f80ae732b9
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 14 additions and 14 deletions

View file

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