🎨 Documents created via the database are no longer automatically hidden Fix https://github.com/siyuan-note/siyuan/issues/9298

This commit is contained in:
Daniel 2023-09-27 16:11:18 +08:00
parent 4c47fdbdb1
commit 3842a17d07
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 10 additions and 25 deletions

View file

@ -481,12 +481,6 @@ func createDocWithMd(c *gin.Context) {
parentID = parentIDArg.(string)
}
hidden := true
hiddenArg := arg["hidden"]
if nil != hiddenArg {
hidden = hiddenArg.(bool)
}
hPath := arg["path"].(string)
markdown := arg["markdown"].(string)
@ -502,7 +496,7 @@ func createDocWithMd(c *gin.Context) {
hPath = "/" + hPath
}
id, err := model.CreateWithMarkdown(notebook, hPath, markdown, parentID, hidden)
id, err := model.CreateWithMarkdown(notebook, hPath, markdown, parentID)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
@ -510,10 +504,6 @@ func createDocWithMd(c *gin.Context) {
}
ret.Data = id
if !hidden {
return
}
box := model.Conf.Box(notebook)
b, _ := model.GetBlock(id, nil)
p := b.Path