From c2be95e83d1597eed8623fdd70a77d617465f91e Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期五, 29 三月 2024 17:04:31 +0800 Subject: [PATCH] 查操作明细增加查询字段 --- middleware/reset_pwd.go | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/middleware/reset_pwd.go b/middleware/reset_pwd.go index f35ae56..64e2785 100644 --- a/middleware/reset_pwd.go +++ b/middleware/reset_pwd.go @@ -16,7 +16,13 @@ return } claims := params.(*request.CustomClaims) - if !claims.ModifiedPwd { + if claims.ModifiedPwd == nil { //鍏煎娌℃湁ModifiedPwd鍊肩殑token + ctx.Fail(ecode.JWTExpire) + c.Abort() + return + } + + if !*claims.ModifiedPwd { ctx.Fail(ecode.ResetPwd) c.Abort() return -- Gitblit v1.8.0