This commit is contained in:
wangchuxiao
2022-08-30 01:38:23 +08:00
parent da9918b655
commit 8d4e5ad3f1
23 changed files with 548 additions and 2351 deletions
+3 -3
View File
@@ -1,11 +1,11 @@
package middleware
import (
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/http"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/token_verify"
"Open_IM/pkg/utils"
"net/http"
"github.com/gin-gonic/gin"
)
@@ -17,7 +17,7 @@ func JWTAuth() gin.HandlerFunc {
if !ok {
log.NewError("", "GetUserIDFromToken false ", c.Request.Header.Get("token"))
c.Abort()
http.RespHttp200(c, constant.ErrParseToken, nil)
c.JSON(http.StatusOK, gin.H{"errCode": 400, "errMsg": errInfo})
return
} else {
log.NewInfo("0", utils.GetSelfFuncName(), "failed: ", errInfo)