mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
⚡ 改进创建文档性能 Fix https://github.com/siyuan-note/siyuan/issues/7175
This commit is contained in:
parent
258acc1142
commit
a3940c220f
5 changed files with 25 additions and 30 deletions
|
|
@ -377,7 +377,7 @@ func createDoc(c *gin.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
err := model.CreateDocByMd(notebook, p, title, md, sorts)
|
||||
tree, err := model.CreateDocByMd(notebook, p, title, md, sorts)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
@ -386,13 +386,6 @@ func createDoc(c *gin.Context) {
|
|||
}
|
||||
|
||||
box := model.Conf.Box(notebook)
|
||||
tree, err := model.LoadTree(box.ID, p)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
pushCreate(box, p, tree.Root.ID, arg)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue