feat: fix bug that send code type will be "phone" when logged-in via autofill (#4164)

This commit is contained in:
DacongDA
2025-09-08 18:13:52 +08:00
committed by GitHub
parent bf67be2af6
commit 2ab85c0c44

View File

@@ -125,6 +125,10 @@ export function setPassword(userOwner, userName, oldPassword, newPassword, code
}
export function sendCode(captchaType, captchaToken, clientSecret, method, countryCode = "", dest, type, applicationId, checkUser = "") {
if (Setting.isValidEmail(dest) && type !== "email") {
type = "email";
}
const formData = new FormData();
formData.append("captchaType", captchaType);
formData.append("captchaToken", captchaToken);