From 15fabf67280d2603f8d8700a4587c4e5dde4ef89 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期二, 29 十月 2019 09:52:09 +0800
Subject: [PATCH] test

---
 middlewares/auth/auth.go |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/middlewares/auth/auth.go b/middlewares/auth/auth.go
index 2662d69..2de927d 100644
--- a/middlewares/auth/auth.go
+++ b/middlewares/auth/auth.go
@@ -1,6 +1,7 @@
 package auth
 
 import (
+	"fmt"
 	"github.com/gin-gonic/gin"
 	"net/http"
 	"strings"
@@ -63,9 +64,11 @@
 				c.Abort()
 			}
 			user := (*jwtDriver).User(c)
-			if user ==nil {
+			fmt.Println("AuthHandler user:",user)
+			if user == nil {
 				util.ResponseFormat(c,code.TokenNotFound,"灏氭湭鐧诲綍锛岃鐧诲綍")
 				c.Abort()
+				return
 			}
 			loginM := user.(map[string]interface{})
 			userId := loginM["id"].(string)

--
Gitblit v1.8.0