17 lines
651 B
JavaScript
17 lines
651 B
JavaScript
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 } });
|
||
}
|