MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / sendVerificationCode

Function sendVerificationCode

web/src/components/settings/PersonalSetting.js:279–300  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

277 };
278
279 const sendVerificationCode = async () => {
280 if (inputs.email === '') {
281 showError(t('请输入邮箱!'));
282 return;
283 }
284 setDisableButton(true);
285 if (turnstileEnabled && turnstileToken === '') {
286 showInfo(t('请稍后几秒重试,Turnstile 正在检查用户环境!'));
287 return;
288 }
289 setLoading(true);
290 const res = await API.get(
291 `/api/verification?email=${inputs.email}&turnstile=${turnstileToken}`,
292 );
293 const { success, message } = res.data;
294 if (success) {
295 showSuccess(t('验证码发送成功,请检查邮箱!'));
296 } else {
297 showError(message);
298 }
299 setLoading(false);
300 };
301
302 const bindEmail = async () => {
303 if (inputs.email_verification_code === '') {

Callers

nothing calls this directly

Calls 4

showErrorFunction · 0.90
showInfoFunction · 0.90
showSuccessFunction · 0.90
tFunction · 0.70

Tested by

no test coverage detected