mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-10-26 11:29:02 +08:00
refactor:重构错误页,优化编辑器,上传新效果图
This commit is contained in:
@@ -161,7 +161,6 @@ func (c *BaseController) ShowErrorPage(errCode int, errMsg string) {
|
||||
if errCode >= 200 && errCode <= 510 {
|
||||
c.CustomAbort(errCode, buf.String())
|
||||
}else{
|
||||
c.CustomAbort(200, buf.String())
|
||||
c.CustomAbort(500, buf.String())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ func (c *DocumentController) Read() {
|
||||
doc, err = doc.FromCacheById(docId)
|
||||
if err != nil {
|
||||
beego.Error("从缓存中读取文档时失败 ->", err)
|
||||
c.ShowErrorPage(500, "文档不存在或已删除")
|
||||
c.ShowErrorPage(404, "文档不存在或已删除")
|
||||
}
|
||||
} else {
|
||||
doc, err = doc.FromCacheByIdentify(id, bookResult.BookId)
|
||||
|
||||
Reference in New Issue
Block a user