middleware

This commit is contained in:
wangchuxiao 2022-03-17 16:43:10 +08:00
parent 604de144b9
commit 984bc37e29

View File

@ -11,7 +11,7 @@ import (
func JWTAuth() gin.HandlerFunc {
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)
c.Set("userID", userID)
if !ok {