From 3f62e343edb2d784435abdacb6344384db7c81c9 Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 5 Mar 2019 22:35:48 +0800 Subject: [PATCH] - enable fake token for non prod env --- business/jxutils/jxcontext/jxcontext.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/business/jxutils/jxcontext/jxcontext.go b/business/jxutils/jxcontext/jxcontext.go index 9e1630267..6aa7d4469 100644 --- a/business/jxutils/jxcontext/jxcontext.go +++ b/business/jxutils/jxcontext/jxcontext.go @@ -11,6 +11,7 @@ import ( "git.rosy.net.cn/jx-callback/business/jxutils/tasksch" "git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/globals" + "github.com/astaxie/beego" ) type IAuther interface { @@ -80,7 +81,7 @@ func New(rootTask tasksch.ITask, token string, w http.ResponseWriter, r *http.Re } } if err == model.ErrTokenIsInvalid { - if false { //beego.BConfig.RunMode != "prod" { + if beego.BConfig.RunMode != "prod" { err = nil } else { errCode = model.ErrCodeTokenIsInvalid