mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
⚡ 改进创建文档性能 Fix https://github.com/siyuan-note/siyuan/issues/7175
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user