mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 文档未索引的情况下文档树打开文档返回报错消息
This commit is contained in:
parent
b077aaef9f
commit
e3e50e9cff
4 changed files with 7 additions and 9 deletions
|
|
@ -93,6 +93,11 @@ func getDocInfo(c *gin.Context) {
|
|||
|
||||
id := arg["id"].(string)
|
||||
info := model.GetDocInfo(id)
|
||||
if nil == info {
|
||||
ret.Code = -1
|
||||
ret.Msg = fmt.Sprintf(model.Conf.Language(15), id)
|
||||
return
|
||||
}
|
||||
ret.Data = info
|
||||
}
|
||||
|
||||
|
|
@ -266,7 +271,7 @@ func getBlockInfo(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
if nil == block {
|
||||
ret.Code = 1
|
||||
ret.Code = -1
|
||||
ret.Msg = fmt.Sprintf(model.Conf.Language(15), id)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue