MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / handleSaveRegistration

Function handleSaveRegistration

static/js/settings.js:598–616  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

596
597// 保存注册配置
598async function handleSaveRegistration(e) {
599 e.preventDefault();
600
601 const data = {
602 max_retries: parseInt(document.getElementById('max-retries').value),
603 timeout: parseInt(document.getElementById('timeout').value),
604 default_password_length: parseInt(document.getElementById('password-length').value),
605 entry_flow: document.getElementById('registration-entry-flow').value || 'native',
606 sleep_min: parseInt(document.getElementById('sleep-min').value),
607 sleep_max: parseInt(document.getElementById('sleep-max').value),
608 };
609
610 try {
611 await api.post('/settings/registration', data);
612 toast.success('注册配置已保存');
613 } catch (error) {
614 toast.error('保存失败: ' + error.message);
615 }
616}
617
618// 保存验证码等待配置
619async function handleSaveEmailCode(e) {

Callers

nothing calls this directly

Calls 3

successMethod · 0.80
errorMethod · 0.80
postMethod · 0.45

Tested by

no test coverage detected