Browse Source

Fix bug: print error log in success.

ZRY 1 year ago
parent
commit
1336d87c8e
1 changed files with 3 additions and 3 deletions
  1. 3 3
      zllauth_gin/gin_handler.go

+ 3 - 3
zllauth_gin/gin_handler.go

@@ -212,9 +212,6 @@ func (h *ZLLAuthGinHandler) HandlingOtherEncryptedRequest(ctx *gin.Context, v in
 		return
 	}
 	ve, ie := h.zllhdl.HandlingOtherEncryptedRequest(jdata.LoginData, v)
-	if h.elh != nil {
-		h.elh.HandlingOtherEncryptedRequestFailed(ctx.Request, ve, ie)
-	}
 	if ve == zllauth1.LFT_SUCCESS {
 		isOK = true
 		next = func(returnData interface{}) {
@@ -225,6 +222,9 @@ func (h *ZLLAuthGinHandler) HandlingOtherEncryptedRequest(ctx *gin.Context, v in
 		}
 		return
 	}
+	if h.elh != nil {
+		h.elh.HandlingOtherEncryptedRequestFailed(ctx.Request, ve, ie)
+	}
 	switch ve {
 	case zllauth1.LFT_DECODE_HEX_FAIL:
 		{