🎨 文档未索引的情况下文档树打开文档返回报错消息

This commit is contained in:
Liang Ding 2022-07-09 17:37:54 +08:00
parent b077aaef9f
commit e3e50e9cff
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 7 additions and 9 deletions

View file

@ -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
}