sms_tool
This commit is contained in:
parent
992f39109d
commit
2e8f0cb3f2
@ -70,7 +70,15 @@ func (c *SmsClient) GetCode(ctx context.Context, key string) (code string, err e
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if value == nil {
|
||||
return "", errors.New("验证码不存在,请重新发送")
|
||||
}
|
||||
switch value.(type) {
|
||||
case string:
|
||||
return value.(string), nil
|
||||
default:
|
||||
return "", errors.New("验证码类型错误,请联系管理员")
|
||||
}
|
||||
}
|
||||
|
||||
// SaveCode 保存验证码
|
||||
|
Loading…
x
Reference in New Issue
Block a user