mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-21 22:53:56 +08:00
fix:修复验证图形验证码
This commit is contained in:
+6
@@ -69,6 +69,12 @@ public class LoginController {
|
|||||||
@PostMapping("/smsVerification")
|
@PostMapping("/smsVerification")
|
||||||
@Operation(summary = "短信验证码")
|
@Operation(summary = "短信验证码")
|
||||||
public Result<Void> smsVerification(@RequestBody SmsVerificationDTO dto) {
|
public Result<Void> smsVerification(@RequestBody SmsVerificationDTO dto) {
|
||||||
|
// 验证图形验证码
|
||||||
|
boolean validate = captchaService.validate(dto.getCaptchaId(), dto.getCaptcha(), true);
|
||||||
|
if (!validate) {
|
||||||
|
throw new RenException(ErrorCode.SMS_CAPTCHA_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
Boolean isMobileRegister = sysParamsService
|
Boolean isMobileRegister = sysParamsService
|
||||||
.getValueObject(Constant.SysMSMParam.SERVER_ENABLE_MOBILE_REGISTER.getValue(), Boolean.class);
|
.getValueObject(Constant.SysMSMParam.SERVER_ENABLE_MOBILE_REGISTER.getValue(), Boolean.class);
|
||||||
if (!isMobileRegister) {
|
if (!isMobileRegister) {
|
||||||
|
|||||||
Reference in New Issue
Block a user