mirror of
https://github.com/mindoc-org/mindoc.git
synced 2026-02-27 17:03:57 +08:00
refactor, replace beego.Error with logs.Error
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/logs"
|
||||
"math"
|
||||
|
||||
"github.com/astaxie/beego"
|
||||
"github.com/astaxie/beego/orm"
|
||||
"github.com/mindoc-org/mindoc/conf"
|
||||
"github.com/mindoc-org/mindoc/models"
|
||||
@@ -40,7 +40,7 @@ func (c *LabelController) Index() {
|
||||
if err == orm.ErrNoRows {
|
||||
c.Abort("404")
|
||||
} else {
|
||||
beego.Error(err)
|
||||
logs.Error(err)
|
||||
c.Abort("500")
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ func (c *LabelController) Index() {
|
||||
searchResult, totalCount, err := models.NewBook().FindForLabelToPager(labelName, pageIndex, conf.PageSize, memberId)
|
||||
|
||||
if err != nil && err != orm.ErrNoRows {
|
||||
beego.Error("查询标签时出错 ->", err)
|
||||
logs.Error("查询标签时出错 ->", err)
|
||||
c.ShowErrorPage(500, "查询文档列表时出错")
|
||||
}
|
||||
if totalCount > 0 {
|
||||
|
||||
Reference in New Issue
Block a user