|
|
@@ -8,6 +8,7 @@ import (
|
|
|
"fmt"
|
|
|
"mtp2_if/config"
|
|
|
"mtp2_if/global/e"
|
|
|
+ "mtp2_if/logger"
|
|
|
"mtp2_if/rediscli"
|
|
|
"net/http"
|
|
|
"runtime"
|
|
|
@@ -132,9 +133,9 @@ func Auth() gin.HandlerFunc {
|
|
|
c.Abort()
|
|
|
return
|
|
|
}
|
|
|
- now := time.Now().UnixMilli()
|
|
|
+ now := time.Now().UTC().UnixMilli()
|
|
|
ts := int64(t) - now
|
|
|
- // logger.GetLogger().Debugf("t:%v now:%v ts: %v", t, now, ts)
|
|
|
+ logger.GetLogger().Debugf("t:%v now:%v ts: %v", t, now, ts)
|
|
|
if ts < -10*1000 || ts > 10*1000 {
|
|
|
c.JSON(http.StatusUnauthorized, gin.H{
|
|
|
"code": e.ERROR,
|