Files
rainblogweb/frontend/src/api/email.js
T

17 lines
651 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { request } from './client.js';
/** 重新发送注册邮箱验证码(8 位数字,存入 pending_users */
export function sendVerify(email, username) {
return request('/email/send-verify', { method: 'POST', body: { email, username } });
}
/** 输入 8 位验证码完成注册:{ code, username, password } */
export function completeRegister(code, username, password) {
return request('/email/complete-register', { method: 'POST', body: { code, username, password } });
}
/** 发送 SMTP 测试邮件(仅管理员) */
export function testSmtp(email) {
return request('/email/test', { method: 'POST', body: { email } });
}