From 52d17fff56c32c591532c79f0bbf96cdbe4b32db Mon Sep 17 00:00:00 2001 From: fanliangbin320 Date: Wed, 12 Jan 2022 10:21:52 +0800 Subject: [PATCH] Init sql miss is_verify_code in table sys_settings, fix auth problem. --- handler/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler/auth.go b/handler/auth.go index 9252a84..5c76dc6 100644 --- a/handler/auth.go +++ b/handler/auth.go @@ -99,7 +99,7 @@ func Authenticator(c *gin.Context) (interface{}, error) { return nil, errors.New("获取是否需要验证码校验失败") } - if isVerifyCode.(bool) { + if isVerifyCode != nil && isVerifyCode.(bool) { // 校验验证码 if !store.Verify(loginVal.UUID, loginVal.Code, true) { loginLog.Status = "1"