pull/218/head
wangchuxiao 3 years ago
parent 604de144b9
commit 984bc37e29

@ -11,7 +11,7 @@ import (
func JWTAuth() gin.HandlerFunc { func JWTAuth() gin.HandlerFunc {
return func(c *gin.Context) { return func(c *gin.Context) {
ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), "")
log.NewInfo("0", utils.GetSelfFuncName(), "userID: ", userID) log.NewInfo("0", utils.GetSelfFuncName(), "userID: ", userID)
c.Set("userID", userID) c.Set("userID", userID)
if !ok { if !ok {

Loading…
Cancel
Save