mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
♻️ Clean code
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/siyuan-note/siyuan/kernel/av"
|
||||
"github.com/siyuan-note/siyuan/kernel/model"
|
||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
@@ -36,7 +37,7 @@ func getMirrorDatabaseBlocks(c *gin.Context) {
|
||||
}
|
||||
|
||||
avID := arg["avID"].(string)
|
||||
ret.Data = av.GetMirrorBlockIDs(avID)
|
||||
ret.Data = treenode.GetMirrorAttrViewBlockIDs(avID)
|
||||
}
|
||||
|
||||
func setDatabaseBlockView(c *gin.Context) {
|
||||
|
||||
@@ -447,7 +447,7 @@ func getBlockInfo(c *gin.Context) {
|
||||
|
||||
id := arg["id"].(string)
|
||||
|
||||
tree, err := model.LoadTreeByID(id)
|
||||
tree, err := model.LoadTreeByBlockID(id)
|
||||
if errors.Is(err, model.ErrIndexing) {
|
||||
ret.Code = 3
|
||||
ret.Msg = model.Conf.Language(56)
|
||||
|
||||
@@ -518,7 +518,7 @@ func duplicateDoc(c *gin.Context) {
|
||||
}
|
||||
|
||||
id := arg["id"].(string)
|
||||
tree, err := model.LoadTreeByID(id)
|
||||
tree, err := model.LoadTreeByBlockID(id)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
||||
Reference in New Issue
Block a user