- TrimBlanChar to TrimBlankChar

- error_code.go
This commit is contained in:
gazebo
2018-11-02 14:11:32 +08:00
parent addb300b1a
commit 386ac29ad7
10 changed files with 31 additions and 14 deletions

View File

@@ -6,8 +6,7 @@ import (
"git.rosy.net.cn/jx-callback/business/jxcallback/auth"
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
"git.rosy.net.cn/jx-callback/globals"
"github.com/astaxie/beego"
"git.rosy.net.cn/jx-callback/business/model"
)
type Context struct {
@@ -52,9 +51,9 @@ func New(rootTask tasksch.ITask, token string, w http.ResponseWriter, r *http.Re
mapData: make(map[interface{}]interface{}),
}
ctx.userInfo, err = auth.GetUserInfo(token)
if err != nil && beego.BConfig.RunMode == "prod" {
globals.SugarLogger.Warnf("token is invalid, token:%s", token)
// return nil, "", err
if err != nil {
// globals.SugarLogger.Warnf("token is invalid, token:%s", token)
return nil, model.ErrCodeTokenIsInvalid, err
}
return ctx, "", nil
}